@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Source+Sans+3:wght@400;600;700&display=swap");

/* ============================================================
   Ambershire Base Theme
   ============================================================ */

:root {
  --amber: #d9b56b;
  --amber-strong: #f3c96b;
  --ember: #c08a3e;

  --obsidian: #0c1116;
  --obsidian-deep: #070a0e;
  --stone: #131a21;
  --stone-soft: #18212b;

  --panel: rgba(16, 20, 26, 0.88);
  --panel-solid: #10141a;
  --panel-soft: rgba(20, 27, 35, 0.86);
  --panel-hover: rgba(29, 38, 49, 0.92);
  --panel-border: rgba(217, 181, 107, 0.25);

  --text: #efe7d6;
  --text-strong: #fff2cf;
  --muted: #d5c8b1;
  --muted-soft: #9f927e;

  --success: #22c55e;
  --danger: #ef4444;
  --info: #60a5fa;
  --purple: #c084fc;

  --sidebar-width: 250px;
  --header-height: 56px;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;

  --shadow-panel: 0 18px 45px rgba(0, 0, 0, 0.32);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1100px 500px at 20% -10%, rgba(217, 181, 107, 0.25), transparent 60%),
    radial-gradient(900px 400px at 90% 10%, rgba(63, 94, 140, 0.18), transparent 60%),
    linear-gradient(180deg, #0b0f14 0%, #111822 45%, #0b0f14 100%);
  background-attachment: fixed;
}

a {
  color: var(--amber-strong);
  text-decoration: none;
}

a:hover {
  color: var(--amber);
  text-decoration: underline;
}

hr {
  border-color: rgba(217, 181, 107, 0.18);
  opacity: 1;
}

.text-muted,
.form-text,
.small.text-muted,
.well-container .text-muted,
.admin-table .text-muted {
  color: #d5c8b1 !important;
}

/* ============================================================
   Main Layout
   ============================================================ */

.wrapper {
  min-height: 100vh;
  padding-top: var(--header-height);
}

.content-wrapper {
  min-height: calc(100vh - var(--header-height));
  margin-left: var(--sidebar-width);
  padding: 2rem 1.5rem 2.5rem;
}

.content {
  width: 100%;
}

.feed-page .content {
  max-width: 1500px;
  margin: 0 auto;
}

.sidebar-overlay {
  display: none;
}

/* ============================================================
   Header / Navbar
   ============================================================ */

.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  min-height: var(--header-height);
  z-index: 1100;
  background: rgba(12, 16, 20, 0.76);
  border-bottom: 1px solid var(--panel-border);
  backdrop-filter: blur(6px);
}

.main-header.navbar {
  padding-top: 0;
  padding-bottom: 0;
}

.main-header .navbar-nav:first-child {
  padding-left: 8px;
}

.main-header .navbar-nav.ms-auto {
  padding-right: 8px;
}

.main-header .nav-link {
  color: var(--text);
  text-decoration: none;
  min-height: var(--header-height);
  display: inline-flex;
  align-items: center;
}

.main-header .nav-link:hover,
.main-header .nav-link:focus {
  color: var(--amber-strong);
  text-decoration: none;
}

.nav-brand {
  display: flex;
  align-items: center;
}

.nav-brand-home {
  padding-right: 0.2rem;
}

.nav-brand-name {
  padding-left: 0;
}

.nav-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  line-height: 1;
}

.nav-title {
  font-family: "Cinzel", "Source Sans 3", serif;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.nav-title-user {
  font-family: "Cinzel", "Source Sans 3", serif;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 0.9rem;
}

.nav-level {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-character {
  gap: 0.35rem;
}

.nav-character-dropdown {
  position: relative;
  top: 1px;
}

.nav-character-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  width: 28px;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  background: rgba(11, 15, 20, 0.7);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-character-toggle:hover,
.nav-character-toggle:focus {
  color: var(--amber-strong);
  border-color: rgba(217, 181, 107, 0.45);
  background: rgba(11, 15, 20, 0.95);
}

.nav-character-menu {
  background: rgba(11, 15, 20, 0.98);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 0.4rem;
  min-width: 240px;
}

.nav-character-menu .dropdown-header {
  color: rgba(255, 236, 196, 0.72);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.35rem 0.75rem;
}

.nav-character-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
  text-decoration: none;
}

.nav-character-menu .dropdown-item:hover {
  background: rgba(217, 181, 107, 0.12);
  color: var(--amber-strong);
}

.nav-character-menu .dropdown-item.active {
  background: rgba(217, 181, 107, 0.18);
  color: var(--amber-strong);
}

.nav-character-menu .character-badges-right {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-avatar-link {
  padding-left: 0.55rem;
  padding-right: 0.55rem;
}

.nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  object-fit: cover;
  border: 1px solid rgba(217, 181, 107, 0.45);
  background: rgba(11, 15, 20, 0.8);
  box-shadow: 0 0 0 2px rgba(11, 15, 20, 0.7);
}

.nav-avatar-link:hover .nav-avatar {
  border-color: var(--amber-strong);
}

.nav-avatar-fallback {
  color: var(--amber-strong);
  font-size: 0.95rem;
}

.community-brand-home {
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

.community-brand-icon {
  width: 36px;
  height: 36px;
}

/* ============================================================
   Sidebar
   ============================================================ */

.main-sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  z-index: 1050;
  background: rgba(9, 13, 18, 0.88);
  border-right: 1px solid var(--panel-border);
  backdrop-filter: blur(6px);
  transition: transform 0.2s ease;
}

.sidebar {
  height: 100%;
  overflow: hidden;
}

.sidebar-scroll {
  height: 100%;
  overflow-y: auto;
  padding: 0.75rem 0.65rem 1rem;
}

.nav-sidebar {
  gap: 0.15rem;
}

.nav-sidebar .nav-header {
  color: rgba(255, 236, 196, 0.55);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 1rem 0.75rem 0.35rem;
}

.nav-sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--muted);
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.nav-sidebar .nav-link p {
  margin: 0;
}

.nav-sidebar .nav-icon {
  width: 20px;
  text-align: center;
  color: rgba(217, 181, 107, 0.78);
}

.nav-sidebar .nav-link:hover,
.nav-sidebar .nav-link:focus,
.nav-sidebar .nav-link.active {
  color: var(--text-strong);
  background: rgba(217, 181, 107, 0.11);
  text-decoration: none;
}

.nav-sidebar .nav-link.active {
  box-shadow: inset 0 0 0 1px rgba(217, 181, 107, 0.26);
}

/* ============================================================
   Banner
   ============================================================ */

.site-banner {
  margin-left: var(--sidebar-width);
  background: rgba(217, 181, 107, 0.12);
  border-bottom: 1px solid rgba(217, 181, 107, 0.2);
  padding: 0.55rem 1.2rem;
  text-align: center;
}

.site-banner a {
  color: var(--text-strong);
  text-decoration: none;
  font-weight: 600;
}

.site-banner a:hover {
  color: var(--amber);
}

.site-banner-warning {
  background: rgba(239, 68, 68, 0.18);
  border-bottom-color: rgba(239, 68, 68, 0.4);
  color: #ffd9d9;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* ============================================================
   Cards / Panels
   ============================================================ */

.card {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-panel);
}

.card-header,
.card-footer {
  background: rgba(9, 13, 18, 0.45);
  border-color: rgba(217, 181, 107, 0.18);
}

.card-body {
  color: var(--text);
}

.card-title {
  color: var(--text-strong);
  font-family: "Cinzel", "Source Sans 3", serif;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.card-outline {
  border-top: 3px solid var(--amber);
}

.card-teal,
.card-primary {
  border-color: var(--panel-border);
}

.card-teal.card-outline,
.card-primary.card-outline {
  border-top-color: var(--amber);
}

.feed-card {
  margin-bottom: 1rem;
}

.section-title {
  color: var(--text-strong);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
}

/* ============================================================
   Buttons / Forms
   ============================================================ */

.btn {
  border-radius: 9px;
  font-weight: 600;
}

.btn-success {
  color: #0b0f14;
  background: var(--amber);
  border-color: var(--amber);
}

.btn-success:hover,
.btn-success:focus {
  color: #0b0f14;
  background: var(--amber-strong);
  border-color: var(--amber-strong);
}

.btn-primary {
  color: #0b0f14;
  background: var(--amber);
  border-color: var(--amber);
}

.btn-primary:hover,
.btn-primary:focus {
  color: #0b0f14;
  background: var(--amber-strong);
  border-color: var(--amber-strong);
}

.btn-outline-warning,
.btn-outline-secondary {
  color: var(--text);
  border-color: rgba(217, 181, 107, 0.35);
}

.btn-outline-warning:hover,
.btn-outline-secondary:hover {
  color: #0b0f14;
  background: var(--amber);
  border-color: var(--amber);
}

.form-control,
.form-select {
  color: var(--text);
  background-color: rgba(9, 13, 18, 0.72);
  border: 1px solid rgba(217, 181, 107, 0.24);
  border-radius: 9px;
}

.form-control:focus,
.form-select:focus {
  color: var(--text);
  background-color: rgba(9, 13, 18, 0.9);
  border-color: rgba(217, 181, 107, 0.62);
  box-shadow: 0 0 0 0.2rem rgba(217, 181, 107, 0.14);
}

.zc-account-page .form-select:disabled,
.zc-account-page .form-control:disabled {
  color: rgba(213, 200, 177, 0.68);
  background-color: rgba(9, 13, 18, 0.58);
  border-color: rgba(217, 181, 107, 0.2);
  opacity: 1;
}

.zc-account-page .zc-move-target:disabled {
  cursor: not-allowed;
}

.zc-import-modal-title {
  color: var(--text-strong);
}

.zc-import-modal-status {
  color: var(--text);
  min-height: 2.2rem;
  font-size: 1rem;
}

.form-control::placeholder {
  color: rgba(213, 200, 177, 0.55);
}

label {
  color: var(--text-strong);
}

.login-box {
  width: min(460px, 100%);
}

.login-box-msg {
  color: var(--muted);
}

.well,
.well-container {
  border: 1px solid rgba(217, 181, 107, 0.2);
  background: rgba(9, 13, 18, 0.45);
  border-radius: var(--radius);
  padding: 1rem;
}

.mw-250 {
  min-width: 250px;
}

/* ============================================================
   Dropdowns / Modals / Tables
   ============================================================ */

.dropdown-menu {
  background: rgba(11, 15, 20, 0.98);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-panel);
}

.dropdown-item {
  color: var(--text);
  border-radius: 8px;
}

.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item.active {
  color: var(--amber-strong);
  background: rgba(217, 181, 107, 0.12);
}

.dropdown-header {
  color: rgba(255, 236, 196, 0.72);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dropdown-divider {
  border-top-color: rgba(217, 181, 107, 0.25);
}

.modal-content {
  color: var(--text);
  background: var(--panel-solid);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
}

.modal-header,
.modal-footer {
  border-color: rgba(217, 181, 107, 0.18);
}

.btn-close {
  filter: invert(1) grayscale(1);
}

.table {
  color: var(--text);
}

.table > :not(caption) > * > * {
  background: transparent;
  border-bottom-color: rgba(217, 181, 107, 0.14);
}

.table thead th {
  color: var(--text-strong);
  border-bottom-color: rgba(217, 181, 107, 0.28);
}

.table-hover tbody tr:hover {
  color: var(--text);
  background: rgba(217, 181, 107, 0.08);
}

/* ============================================================
   Tabs / Pills / Badges
   ============================================================ */

.nav-tabs {
  border-bottom-color: rgba(217, 181, 107, 0.25);
}

#adminTabs.nav-tabs,
#communityAdminTabs.nav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.45rem;
  border-bottom: 0;
}

#adminTabs.nav-tabs .nav-item,
#communityAdminTabs.nav-tabs .nav-item {
  margin: 0;
}

#adminTabs.nav-tabs .nav-item.ms-auto,
#communityAdminTabs.nav-tabs .nav-item.ms-auto {
  margin-left: 0 !important;
}

.nav-tabs .nav-link {
  color: var(--muted);
  border-color: transparent;
  border-radius: 10px 10px 0 0;
  white-space: nowrap;
}

#adminTabs.nav-tabs .nav-link,
#communityAdminTabs.nav-tabs .nav-link {
  border: 1px solid rgba(217, 181, 107, 0.2);
  border-radius: 8px;
  background: rgba(12, 17, 22, 0.42);
  min-height: 2.25rem;
  padding: 0.4rem 0.72rem;
}

.nav-tabs .nav-link:hover {
  color: var(--amber-strong);
  border-color: rgba(217, 181, 107, 0.2);
}

.nav-tabs .nav-link.active {
  color: var(--text-strong);
  background: rgba(217, 181, 107, 0.12);
  border-color: rgba(217, 181, 107, 0.32);
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(217, 181, 107, 0.32);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  color: var(--amber-strong);
  background: rgba(217, 181, 107, 0.12);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.badge-pill.badge-dark {
  background: rgba(217, 181, 107, 0.18);
  color: var(--amber-strong);
  border-color: transparent;
}

.badge.badge-warning {
  background: rgba(217, 181, 107, 0.24);
  border: 1px solid rgba(217, 181, 107, 0.5);
  color: #ffe6a6;
}

/* ============================================================
   Announcements
   ============================================================ */

.announcement-list {
  display: grid;
  gap: 1rem;
}

.announcement-card,
.announcement-detail,
.announcement-editor-panel,
.announcement-editor-preview-panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  box-shadow: var(--shadow-panel);
}

.announcement-card,
.announcement-detail {
  padding: 1rem;
}

.announcement-card-header,
.announcement-detail-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.announcement-title-link,
.announcement-detail-title {
  color: var(--amber-strong);
}

.announcement-title-link {
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
}

.announcement-detail-title {
  flex-basis: 100%;
  font-size: 2rem;
  margin: 0.4rem 0 0;
}

.announcement-back-link {
  color: var(--muted);
  text-decoration: none;
}

.announcement-meta,
.announcement-editor-subtext,
.announcement-editor-count,
.announcement-editor-help,
.announcement-editor-empty-preview {
  color: #d5c8b1;
}

.announcement-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
}

.announcement-body,
.announcement-excerpt {
  margin-top: 1rem;
}

.announcement-excerpt-wrap {
  position: relative;
}

.announcement-excerpt {
  max-height: 16rem;
  overflow: hidden;
}

.announcement-card.is-truncated .announcement-excerpt-wrap::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4rem;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(17, 24, 32, 0), var(--panel));
}

.announcement-read-more {
  display: none;
  width: fit-content;
  margin-top: 0.75rem;
  color: var(--amber-strong);
  font-weight: 700;
  text-decoration: none;
}

.announcement-card.is-truncated .announcement-read-more {
  display: inline-flex;
}

.announcement-read-more:hover {
  color: var(--text-strong);
}

.announcement-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
  margin-top: 1.1rem;
  align-items: start;
}

.announcement-image-grid.detail {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.announcement-image-link {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 7rem;
  padding: 0.35rem;
  border: 1px solid rgba(217, 181, 107, 0.24);
  border-radius: 8px;
  background: rgba(7, 10, 14, 0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  transition: border-color 0.16s ease, background 0.16s ease;
}

.announcement-image-link:hover {
  border-color: rgba(217, 181, 107, 0.46);
  background: rgba(12, 17, 22, 0.68);
}

.announcement-image-grid img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 16rem;
  border-radius: 6px;
  object-fit: contain;
}

.announcement-image-grid.detail .announcement-image-link {
  min-height: 12rem;
}

.announcement-image-grid.detail img {
  max-height: min(72vh, 42rem);
}

.discord-markdown {
  color: var(--text);
  line-height: 1.48;
  overflow-wrap: anywhere;
}

.discord-markdown p {
  margin: 0 0 0.75rem;
}

.discord-markdown h1,
.discord-markdown h2,
.discord-markdown h3 {
  color: var(--text-strong);
  font-weight: 700;
  margin: 1rem 0 0.55rem;
}

.discord-markdown h1 {
  font-size: 1.7rem;
}

.discord-markdown h2 {
  font-size: 1.35rem;
}

.discord-markdown h3 {
  font-size: 1.1rem;
}

.discord-markdown a {
  color: var(--amber-strong);
  text-decoration: underline;
}

.discord-markdown code {
  background: rgba(7, 10, 14, 0.82);
  border: 1px solid rgba(217, 181, 107, 0.16);
  border-radius: 4px;
  color: var(--text-strong);
  padding: 0.1rem 0.25rem;
}

.discord-markdown pre {
  background: rgba(7, 10, 14, 0.82);
  border: 1px solid rgba(217, 181, 107, 0.16);
  border-radius: 6px;
  padding: 0.75rem;
  overflow: auto;
}

.discord-markdown blockquote {
  border-left: 4px solid var(--amber);
  color: #e5dac7;
  margin: 0 0 0.75rem;
  padding-left: 0.75rem;
}

.discord-markdown ul {
  margin: 0 0 0.75rem 1.25rem;
  padding: 0;
}

.announcement-editor-shell {
  display: grid;
  gap: 1rem;
}

.announcement-editor-topbar {
  position: sticky;
  top: calc(var(--header-height) + 0.75rem);
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: rgba(16, 20, 26, 0.96);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  box-shadow: var(--shadow-panel);
}

.announcement-editor-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.announcement-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 1rem;
  align-items: start;
}

.announcement-editor-panel,
.announcement-editor-preview-panel {
  padding: 1rem;
}

.announcement-editor-preview-panel {
  position: sticky;
  top: calc(var(--header-height) + 6.8rem);
}

.announcement-editor-check {
  display: flex;
  align-items: end;
  padding-bottom: 0.45rem;
}

.announcement-editor-textarea {
  min-height: 34rem;
  font-family: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  resize: vertical;
}

.announcement-editor-preview-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.announcement-editor-preview-label {
  color: var(--text-strong);
  font-family: "Cinzel", "Source Sans 3", serif;
  font-weight: 700;
}

.announcement-editor-preview-card {
  box-shadow: none;
}

.announcement-editor-image-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.announcement-editor-image-tile {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(217, 181, 107, 0.22);
  border-radius: 8px;
  background: rgba(7, 10, 14, 0.55);
}

.announcement-editor-image-tile img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.announcement-editor-image-remove {
  position: absolute;
  right: 0.35rem;
  bottom: 0.35rem;
  border: 1px solid rgba(248, 113, 113, 0.55);
  border-radius: 6px;
  padding: 0.15rem 0.45rem;
  color: #ffe4e6;
  background: rgba(127, 29, 29, 0.82);
  font-size: 0.78rem;
}

.announcement-preview-title {
  color: var(--amber-strong);
  font-size: 1.45rem;
  margin: 0;
}

.announcement-editor-error {
  padding: 0.75rem 1rem;
  color: #ffe4e6;
  background: rgba(127, 29, 29, 0.34);
  border: 1px solid rgba(248, 113, 113, 0.45);
  border-radius: 8px;
}

.announcement-editor-mobile-tabs {
  display: none;
}

/* ============================================================
   Dashboard / Profile Shells
   ============================================================ */

.dashboard-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(320px, 25vw, 420px);
  gap: 1rem;
  align-items: start;
}

.dashboard-shell.split-panels {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
}

.dashboard-main,
.dashboard-side {
  min-width: 0;
  align-self: start;
}

.dashboard-main > .card,
.dashboard-side > .card {
  height: auto;
}

.community-realm-status-list {
  display: grid;
  gap: 0.55rem;
}

.community-realm-status-row {
  display: grid;
  gap: 0.35rem;
  padding: 0;
  border-bottom: 1px solid var(--border);
}

.community-realm-status-row:first-child {
  padding-top: 0;
}

.community-realm-status-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.community-realm-status-name {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  color: var(--text);
}

.community-realm-status-dot {
  width: 0.58rem;
  height: 0.58rem;
  flex: 0 0 0.58rem;
  border-radius: 999px;
  background: #d85b5b;
  box-shadow: 0 0 0 3px rgba(216, 91, 91, 0.12);
}

.community-realm-status-dot.is-online {
  background: #5fca7a;
  box-shadow: 0 0 0 3px rgba(95, 202, 122, 0.14);
}

.community-realm-status-dot.is-offline {
  background: #d85b5b;
  box-shadow: 0 0 0 3px rgba(216, 91, 91, 0.12);
}

.community-realm-status-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.9rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.community-realm-status-stats strong {
  color: var(--accent);
}

.community-verify-result {
  display: grid;
  gap: 0.65rem;
}

.community-verify-command {
  display: block;
  padding: 0.85rem;
  padding-right: 3.2rem;
  border: 1px solid rgba(217, 181, 107, 0.24);
  border-radius: 8px;
  background: rgba(6, 10, 14, 0.72);
  color: var(--amber-strong);
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.community-verify-command-wrap {
  position: relative;
}

.community-verify-copy {
  position: absolute;
  top: 50%;
  right: 0.45rem;
  transform: translateY(-50%);
}

.community-verify-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  color: var(--muted);
}

.community-pending-verification-row.is-expired {
  opacity: 0.72;
}

.community-verified-success {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-strong);
}

.community-verified-success i {
  color: #5fca7a;
  font-size: 1.6rem;
}

.community-main-display {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 0.9rem;
  align-items: end;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(217, 181, 107, 0.18);
}

.community-main-display-controls {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.dash-hero,
.profile-hero {
  margin-bottom: 1rem;
}

.dash-header,
.profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.profile-kicker {
  color: var(--amber);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.15rem;
}

.profile-name {
  color: var(--text-strong);
  font-family: "Cinzel", "Source Sans 3", serif;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
}

.profile-name a,
.profile-link {
  color: inherit;
  text-decoration: none;
}

.profile-sub,
.profile-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.profile-sub-text {
  color: var(--muted);
  font-size: 0.92rem;
}

.class-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  vertical-align: middle;
  display: inline-block;
}

.profile-name .class-icon {
  width: 34px;
  height: 34px;
  margin-bottom: 2px;
}

/* ============================================================
   Posts / Feed
   ============================================================ */

.guild-post {
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid rgba(217, 181, 107, 0.18);
  background: rgba(12, 16, 20, 0.6);
  margin-bottom: 0.75rem;
}

.guild-post.is-pinned {
  border-color: rgba(217, 181, 107, 0.5);
  box-shadow: 0 0 0 1px rgba(217, 181, 107, 0.2);
}

.guild-post-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}

.guild-post-title {
  font-weight: 700;
  color: var(--text-strong);
  text-decoration: none;
}

.guild-post-title:hover {
  color: var(--amber);
  text-decoration: none;
}

.guild-post-body {
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.guild-post-body a {
  color: var(--amber-strong);
  text-decoration: underline;
}

.raid-sr-help {
  color: var(--text) !important;
  opacity: 0.86;
}

.guild-post-body.is-collapsed {
  max-height: 6.5em;
  overflow: hidden;
  position: relative;
}

.post-meta,
.post-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.post-actions {
  justify-content: space-between;
  margin-top: 0.6rem;
}

.post-time {
  color: var(--muted-soft);
  font-size: 0.85rem;
  text-decoration: none;
}

.post-time:hover {
  color: var(--amber);
  text-decoration: none;
}

.post-composer {
  display: grid;
  gap: 0.6rem;
}

.community-feed-composer {
  border: 1px solid rgba(217, 181, 107, 0.2);
  background: rgba(12, 16, 20, 0.68);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
}

.post-visibility {
  max-width: 160px;
}

.post-divider {
  margin: 1rem 0;
}

.feed-composer-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.feed-error {
  border: 1px solid rgba(239, 68, 68, 0.42);
  background: rgba(127, 29, 29, 0.35);
  color: #ffd7d7;
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  font-size: 0.9rem;
}

.feed-list {
  display: grid;
  gap: 0.75rem;
}

.feed-post {
  border: 1px solid rgba(217, 181, 107, 0.2);
  background: rgba(12, 16, 20, 0.68);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
}

.feed-post-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.55rem;
}

.feed-author-avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(217, 181, 107, 0.4);
  background: rgba(11, 15, 20, 0.9);
}

.feed-author-meta {
  min-width: 0;
  flex: 1;
}

.feed-author-name {
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.1;
}

.feed-author-name a,
.feed-comment-name a,
.guides-meta a,
.comment-meta a,
.announcement-meta a {
  text-decoration: none;
}

.feed-author-name a:hover,
.feed-comment-name a:hover,
.guides-meta a:hover,
.comment-meta a:hover,
.announcement-meta a:hover {
  text-decoration: underline;
}

.feed-author-sub {
  margin-top: 0.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted-soft);
  font-size: 0.8rem;
}

.feed-post-time {
  color: var(--muted-soft);
  text-decoration: none;
}

.feed-post-time:hover {
  color: var(--amber-strong);
  text-decoration: none;
}

.feed-post-body {
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
}

.feed-post-body a {
  color: var(--amber-strong);
}

.feed-reactions {
  margin-top: 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.feed-reaction-btn {
  border: 1px solid rgba(217, 181, 107, 0.25);
  background: rgba(12, 16, 20, 0.68);
  color: var(--text);
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
}

.feed-reaction-btn.is-active {
  border-color: rgba(217, 181, 107, 0.6);
  background: rgba(217, 181, 107, 0.14);
  color: var(--amber-strong);
}

.feed-reaction-add-btn {
  border: 1px dashed rgba(217, 181, 107, 0.45);
  background: rgba(12, 16, 20, 0.68);
  color: var(--amber-strong);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  font-weight: 700;
}

.feed-reaction-picker {
  position: fixed;
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(9, 13, 18, 0.98);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  padding: 0.35rem 0.45rem;
  box-shadow: var(--shadow-panel);
}

.feed-reaction-picker-btn {
  border: 0;
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.feed-reaction-picker-btn:hover {
  background: rgba(217, 181, 107, 0.14);
}

.feed-images {
  margin-top: 0.65rem;
  display: grid;
  gap: 0.45rem;
}

.feed-images-1 {
  grid-template-columns: 1fr;
  justify-items: flex-start;
}

.feed-images-1 .feed-image-tile {
  display: inline-flex;
  width: auto;
  max-width: min(100%, 620px);
  min-height: 0;
  max-height: none;
}

.feed-images-1 .feed-image-tile img {
  width: auto;
  max-width: min(100%, 620px);
  height: auto;
  max-height: clamp(220px, 42vh, 460px);
  object-fit: contain;
}

.feed-images-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feed-images-2 .feed-image-tile {
  min-height: clamp(150px, 24vh, 250px);
  max-height: clamp(150px, 24vh, 250px);
}

.feed-images-3 {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
}

.feed-images-3 .feed-image-tile:nth-child(1) {
  grid-row: span 2;
  min-height: clamp(240px, 34vh, 360px);
  max-height: clamp(240px, 34vh, 360px);
}

.feed-images-3 .feed-image-tile:not(:nth-child(1)),
.feed-images-4 .feed-image-tile {
  min-height: clamp(130px, 18vh, 190px);
  max-height: clamp(130px, 18vh, 190px);
}

.feed-images-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feed-image-tile {
  display: block;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(217, 181, 107, 0.22);
  background: rgba(9, 13, 18, 0.8);
  min-height: 130px;
  cursor: zoom-in;
}

.feed-image-tile::after {
  content: "\f00e";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  right: 0.55rem;
  bottom: 0.45rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff3d8;
  background: rgba(10, 14, 19, 0.62);
  border: 1px solid rgba(217, 181, 107, 0.38);
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.feed-image-tile:hover::after,
.feed-image-tile:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.feed-image-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.feed-video-wrap {
  position: relative;
  margin-top: 0.65rem;
  width: min(100%, 720px);
  aspect-ratio: 16 / 9;
  height: auto;
  padding-top: 0;
  display: block;
  max-height: calc(720px * 9 / 16);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(217, 181, 107, 0.22);
  background: rgba(9, 13, 18, 0.8);
}

.feed-video-wrap::before {
  content: "";
  display: none;
}

.feed-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@supports not (aspect-ratio: 16 / 9) {
  .feed-video-wrap {
    width: 100%;
    max-width: 720px;
    aspect-ratio: auto;
    height: auto;
    padding-top: 0;
    max-height: none;
  }

  .feed-video-wrap::before {
    display: block;
    padding-top: 56.25%;
    content: "";
  }
}

.feed-comments {
  margin-top: 0.85rem;
  border-top: 1px solid rgba(217, 181, 107, 0.14);
  padding-top: 0.75rem;
}

.feed-comment-form {
  display: grid;
  gap: 0.4rem;
}

.feed-comment-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.feed-comment-file {
  font-size: 0.8rem;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-comments-list {
  margin-top: 0.65rem;
  display: grid;
  gap: 0.55rem;
}

.feed-comments-more-wrap {
  margin-top: 0.55rem;
}

.feed-comments-more-btn {
  font-size: 0.78rem;
}

.feed-comment {
  border: 1px solid rgba(217, 181, 107, 0.16);
  background: rgba(10, 14, 18, 0.58);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
}

.feed-comment.is-pending {
  opacity: 0.72;
}

.feed-comment-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.feed-comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(217, 181, 107, 0.33);
}

.feed-comment-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: rgba(9, 13, 18, 0.75);
}

.feed-comment-meta {
  min-width: 0;
  flex: 1;
}

.feed-comment-name {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.1;
}

.feed-comment-time {
  color: var(--muted-soft);
  font-size: 0.74rem;
}

.feed-comment-body {
  margin-top: 0.35rem;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.9rem;
}

.feed-comment-body a {
  color: var(--amber-strong);
}

.feed-comment-image {
  display: inline-block;
  margin-top: 0.4rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(217, 181, 107, 0.22);
  max-width: 240px;
  max-height: 180px;
  cursor: zoom-in;
}

.feed-comment-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.feed-image-viewer-modal .modal-dialog {
  max-width: min(96vw, 1300px);
}

.feed-image-viewer-content {
  background: rgba(8, 11, 16, 0.96);
  border-color: rgba(217, 181, 107, 0.28);
}

.feed-image-viewer-header {
  align-items: center;
  gap: 0.75rem;
}

.feed-image-viewer-counter {
  margin-left: auto;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(217, 181, 107, 0.28);
  background: rgba(217, 181, 107, 0.12);
  color: var(--amber-strong);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
}

.feed-image-viewer-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 0.9rem 1rem;
}

.feed-image-viewer-frame {
  min-height: min(70vh, 760px);
  max-height: min(70vh, 760px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(217, 181, 107, 0.2);
  background: rgba(4, 6, 10, 0.95);
}

.feed-image-viewer-frame img {
  max-width: 100%;
  max-height: min(68vh, 740px);
  width: auto;
  height: auto;
  object-fit: contain;
}

.feed-image-viewer-nav {
  border: 1px solid rgba(217, 181, 107, 0.35);
  background: rgba(10, 14, 19, 0.82);
  color: #ffe9b4;
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease, background 0.12s ease, opacity 0.12s ease;
}

.feed-image-viewer-nav:hover:not(:disabled),
.feed-image-viewer-nav:focus-visible:not(:disabled) {
  transform: translateY(-1px);
  background: rgba(217, 181, 107, 0.22);
}

.feed-image-viewer-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.feed-comment-replies {
  margin-top: 0.45rem;
  margin-left: 1rem;
  display: grid;
  gap: 0.45rem;
}

.feed-replies-controls {
  margin-top: 0.45rem;
  display: inline-flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.feed-replies-toggle-btn,
.feed-replies-more-btn {
  font-size: 0.76rem;
  padding: 0.12rem 0.5rem;
}

.feed-reply-form {
  margin-top: 0.45rem;
}

.feed-attachment-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
  gap: 0.45rem;
}

.feed-preview-tile {
  position: relative;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid rgba(217, 181, 107, 0.24);
  background: rgba(9, 13, 18, 0.7);
  aspect-ratio: 1 / 1;
}

.feed-preview-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feed-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  border: 0;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.feed-infinite-sentinel {
  width: 100%;
  height: 2px;
  margin-top: 0.5rem;
}

#feedDeleteConfirmModal .modal-body {
  color: var(--muted);
}

#feedDeleteConfirmModal .btn-danger,
#feedCommentDeleteConfirmModal .btn-danger {
  border-color: rgba(239, 68, 68, 0.65);
  background: rgba(127, 29, 29, 0.85);
  color: #ffe7e7;
}

#feedDeleteConfirmModal .btn-danger:hover,
#feedDeleteConfirmModal .btn-danger:focus,
#feedCommentDeleteConfirmModal .btn-danger:hover,
#feedCommentDeleteConfirmModal .btn-danger:focus {
  border-color: rgba(239, 68, 68, 0.95);
  background: rgba(153, 27, 27, 0.95);
  color: #fff;
}

#feedCommentDeleteConfirmModal .modal-body {
  color: var(--muted);
}

/* ============================================================
   Guild / Raid Utility Blocks
   ============================================================ */

.guild-pill {
  color: var(--text);
  background: rgba(105, 204, 240, 0.12);
  border-color: rgba(105, 204, 240, 0.4);
}

.guild-pill-link {
  color: var(--text);
  text-decoration: none;
}

.guild-pill-link:hover {
  color: var(--text);
  text-decoration: none;
  border-color: rgba(105, 204, 240, 0.65);
}

.guild-banner {
  margin-top: 1rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(217, 181, 107, 0.2);
}

.guild-banner img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  display: block;
}

.guild-roster {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: grid;
  gap: 0.4rem;
}

.guild-roster li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text);
}

.guild-roster .roster-left,
.guild-roster .roster-right {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.guild-roster .roster-right {
  margin-left: auto;
}

.raid-list,
.guild-raid-list {
  display: grid;
  gap: 0.75rem;
}

.raids-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1rem;
  align-items: start;
}

.raids-toolbar {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

.raids-toolbar-item {
  min-width: 220px;
}

.raids-toolbar-actions {
  margin-left: auto;
  min-width: 0;
}

.raid-list-item {
  display: block;
  text-decoration: none;
}

.raid-list-item:hover {
  text-decoration: none;
}

.raid-list-title {
  color: var(--text-strong);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.raid-list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}

#raidsCalendar .fc .fc-toolbar-title {
  color: var(--text-strong);
  font-family: "Cinzel", "Source Sans 3", serif;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}

#raidsCalendar .fc {
  --fc-page-bg-color: transparent;
  --fc-neutral-bg-color: rgba(217, 181, 107, 0.12);
  --fc-border-color: rgba(217, 181, 107, 0.2);
  --fc-button-bg-color: rgba(10, 14, 19, 0.9);
  --fc-button-border-color: rgba(217, 181, 107, 0.35);
  --fc-button-hover-bg-color: rgba(217, 181, 107, 0.16);
  --fc-button-hover-border-color: rgba(217, 181, 107, 0.65);
  --fc-button-active-bg-color: rgba(217, 181, 107, 0.22);
  --fc-button-active-border-color: rgba(217, 181, 107, 0.75);
}

#raidsCalendar .fc .fc-button {
  border: 1px solid rgba(217, 181, 107, 0.35);
  background: rgba(10, 14, 19, 0.9);
  color: var(--amber-strong);
  box-shadow: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.74rem;
  font-weight: 700;
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
}

#raidsCalendar .fc .fc-button:hover,
#raidsCalendar .fc .fc-button:focus {
  border-color: rgba(217, 181, 107, 0.65);
  background: rgba(217, 181, 107, 0.16);
  color: var(--amber-strong);
}

#raidsCalendar .fc .fc-button .fc-icon {
  color: var(--amber-strong);
}

#raidsCalendar .fc .fc-button-primary:not(:disabled).fc-button-active,
#raidsCalendar .fc .fc-button-primary:not(:disabled):active {
  border-color: rgba(217, 181, 107, 0.75);
  background: rgba(217, 181, 107, 0.22);
  color: #ffe6a6;
}

#raidsCalendar .fc .fc-toolbar.fc-header-toolbar {
  margin-bottom: 0.8rem;
}

#raidsCalendar .fc-theme-standard td,
#raidsCalendar .fc-theme-standard th {
  border-color: rgba(217, 181, 107, 0.18);
}

#raidsCalendar .fc .fc-scrollgrid,
#raidsCalendar .fc .fc-scrollgrid td,
#raidsCalendar .fc .fc-scrollgrid th,
#raidsCalendar .fc .fc-daygrid-day,
#raidsCalendar .fc .fc-daygrid-day-frame {
  border-color: rgba(217, 181, 107, 0.18) !important;
}

#raidsCalendar .fc .fc-scrollgrid {
  border: 1px solid rgba(217, 181, 107, 0.18) !important;
}

#raidsCalendar .fc-theme-standard th,
#raidsCalendar .fc-theme-standard .fc-col-header-cell {
  background: rgba(8, 12, 16, 0.62) !important;
}

#raidsCalendar .fc .fc-scrollgrid-section-header > *,
#raidsCalendar .fc .fc-scrollgrid-section-header th,
#raidsCalendar .fc .fc-col-header,
#raidsCalendar .fc .fc-col-header table,
#raidsCalendar .fc .fc-col-header-cell {
  background: rgba(8, 12, 16, 0.62) !important;
}

#raidsCalendar .fc-theme-standard .fc-scrollgrid {
  border-color: rgba(217, 181, 107, 0.18);
  background: transparent;
}

#raidsCalendar .fc-theme-standard .fc-scrollgrid table {
  background: transparent;
}

#raidsCalendar .fc-col-header-cell-cushion,
#raidsCalendar .fc-daygrid-day-number {
  color: var(--amber-strong);
  margin-top: 2px;
  margin-right: 2px;
}

#raidsCalendar .fc-day-other .fc-daygrid-day-number {
  color: var(--muted-soft);
}

#raidsCalendar .fc-daygrid-day {
  background: rgba(8, 12, 16, 0.42);
}

#raidsCalendar .fc-day-today {
  background: rgba(217, 181, 107, 0.1) !important;
}

#raidsCalendar .fc-daygrid-day.fc-day-today .fc-daygrid-day-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  height: 1.6rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(217, 181, 107, 0.7);
  background: rgba(217, 181, 107, 0.26);
  color: #ffeec4 !important;
  font-weight: 800;
  line-height: 1;
}

#raidsCalendar .fc-daygrid-event {
  border: 1px solid rgba(217, 181, 107, 0.45);
  background: rgba(105, 204, 240, 0.2);
  color: #eaf5ff;
  border-radius: 6px;
  padding: 1px 4px;
}

#raidsCalendar .fc-event-title {
  font-weight: 600;
}

#raidsCalendar .fc-raid-reset {
  border-color: rgba(255, 160, 64, 0.62) !important;
  background: rgba(255, 160, 64, 0.2) !important;
  color: #ffe5c2 !important;
  cursor: default;
}

/* FullCalendar applies .fc/.fc-theme-standard to #raidsCalendar itself. */
#raidsCalendar.fc,
#raidsCalendar.fc-theme-standard {
  --fc-border-color: rgba(217, 181, 107, 0.18);
  --fc-page-bg-color: transparent;
  --fc-neutral-bg-color: rgba(217, 181, 107, 0.12);
  --fc-today-bg-color: rgba(217, 181, 107, 0.1);
}

#raidsCalendar.fc-theme-standard .fc-scrollgrid,
#raidsCalendar.fc-theme-standard td,
#raidsCalendar.fc-theme-standard th {
  border-color: rgba(217, 181, 107, 0.18) !important;
}

#raidsCalendar .fc-scrollgrid,
#raidsCalendar .fc-scrollgrid table,
#raidsCalendar .fc-scrollgrid td,
#raidsCalendar .fc-scrollgrid th {
  border-color: rgba(217, 181, 107, 0.18) !important;
}

#raidsCalendar .fc-col-header-cell,
#raidsCalendar .fc-col-header-cell-cushion,
#raidsCalendar .fc-scrollgrid-section-header th {
  background: rgba(8, 12, 16, 0.62) !important;
}

#raidsCalendar .fc-daygrid-day,
#raidsCalendar .fc-daygrid-day-frame,
#raidsCalendar .fc-scrollgrid tbody td {
  background: rgba(8, 12, 16, 0.42) !important;
}

.raid-detail-overview .raid-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 0.8rem;
}

.raid-manage-softres {
  min-width: 280px;
}

@media (max-width: 760px) {
  .raids-layout {
    grid-template-columns: 1fr;
  }

  .raids-toolbar-item {
    min-width: 100%;
  }

  .raids-toolbar-actions {
    margin-left: 0;
  }

  .raid-detail-overview .raid-detail-grid {
    grid-template-columns: 1fr;
  }

  .raid-manage-softres {
    min-width: 100%;
    width: 100%;
  }
}

.raid-upcoming-list {
  max-height: 700px;
  overflow: auto;
  padding-right: 0.25rem;
}

.raid-upcoming-pagination {
  margin-top: 0.7rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.raid-dashboard-shell {
  align-items: flex-start;
}

.raid-calendar-card .card-body {
  padding: 1rem;
}

.raid-calendar-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.raid-calendar-heading {
  display: grid;
  gap: 0.2rem;
}

.raid-calendar-range-label {
  font-size: 0.84rem;
}

.raid-calendar-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: nowrap;
}

.raid-calendar-scope {
  min-width: 180px;
  flex: 0 1 220px;
}

.raid-calendar-reset-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #d8c9ac;
  white-space: nowrap;
  min-height: 2rem;
}

.raid-calendar-reset-toggle .form-check-input {
  margin-top: 0;
}

.raid-calendar-controls .form-select,
.raid-calendar-controls .btn {
  min-height: 2rem;
}

.raid-calendar-nav {
  flex: 0 0 auto;
}

.raid-calendar-nav .btn {
  min-width: 2.2rem;
}

.guild-post-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  flex-wrap: wrap;
}

.guild-post-external {
  border-color: rgba(105, 204, 240, 0.34);
}

.raid-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 1.2rem;
}

.raid-overview-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.raid-overview-meta {
  display: grid;
  gap: 0.4rem;
}

.raid-overview-description {
  padding: 0.6rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(217, 181, 107, 0.2);
  background: rgba(12, 16, 20, 0.55);
  min-width: 0;
}

.raid-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: baseline;
}

.raid-meta-label {
  min-width: 90px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  color: var(--muted);
}

.raid-meta-value {
  color: var(--text);
  font-size: 0.95rem;
}

.raid-overview-stats {
  display: grid;
  gap: 0.6rem;
}

.raid-stat {
  padding: 0.6rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(217, 181, 107, 0.2);
  background: rgba(12, 16, 20, 0.55);
}

.raid-stat-header {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.raid-stat-values {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.raid-role-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(217, 181, 107, 0.35);
  color: var(--amber-strong);
  font-size: 0.75rem;
  background: rgba(217, 181, 107, 0.12);
}

.signup-role {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text);
  font-size: 0.85rem;
}

.signup-role-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: inline-block;
}

.signup-role-label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.75rem;
  color: var(--muted);
}

.signup-status-icon {
  margin-left: 0.2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.signup-status-icon.is-confirmed {
  color: #7fe3a1;
}

.signup-status-icon.is-waitlist {
  color: #e6c66e;
}

.signup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.signup-header-main {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.raid-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  width: 100%;
}

.raid-group-col {
  background: rgba(10, 12, 16, 0.7);
  border: 1px solid rgba(217, 181, 107, 0.2);
  border-radius: 12px;
  padding: 0.6rem;
  min-height: 140px;
  min-width: 0;
}

.raid-group-header {
  font-family: "Cinzel", "Source Sans 3", serif;
  color: var(--amber-strong);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}

.raid-group-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 80px;
}

.raid-signup-card {
  border: 1px solid rgba(217, 181, 107, 0.2);
  background: rgba(12, 16, 20, 0.9);
  border-radius: 10px;
  padding: 0.5rem;
}

.loot-item {
  width: 100%;
  display: grid;
  align-items: center;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 0.65rem;
  border: 1px solid rgba(217, 181, 107, 0.18);
  border-radius: 10px;
  background: rgba(9, 13, 18, 0.52);
  color: var(--text);
  padding: 0.45rem 0.55rem;
}

.loot-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(217, 181, 107, 0.28);
  background: rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.loot-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.loot-name {
  display: inline-block;
  font-weight: 700;
  margin-bottom: 0.2rem;
  text-decoration: none;
}

.loot-name:hover {
  text-decoration: none;
}

.loot-meta {
  color: var(--muted);
  font-size: 0.83rem;
}

.external-raid-item-row {
  grid-template-columns: 40px 1fr;
  gap: 0.65rem;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
}

.external-raid-item-row .loot-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.external-raid-reserve-tabs {
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.external-raid-reserve-tabs .nav-link {
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.78rem;
  padding: 0.4rem 0.75rem;
}

.external-raid-reserve-panels {
  border: 1px solid rgba(217, 181, 107, 0.22);
  border-radius: 10px;
  background: rgba(10, 14, 18, 0.62);
  padding: 0.8rem;
}

.external-raid-reserve-panel {
  display: none;
}

.external-raid-reserve-panel.is-active {
  display: block;
}

@media (max-width: 1180px) {
  .raid-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .raid-overview-grid {
    grid-template-columns: 1fr;
  }

  .raid-calendar-controls {
    width: 100%;
    flex-wrap: wrap;
  }

  .raid-calendar-scope {
    min-width: 100%;
    flex-basis: 100%;
    order: 2;
  }

  .raid-calendar-nav {
    order: 1;
  }

  .raid-groups {
    grid-template-columns: minmax(0, 1fr);
  }
}

.dashboard-level-badge {
  min-width: 62px;
  justify-content: center;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.dashboard-realm-groups {
  display: grid;
  gap: 0.8rem;
}

.dashboard-realm-group {
  border-top:0;
  /*border-top: 1px solid rgba(217, 181, 107, 0.16);*/
  padding-top: 0.65rem;
}

.dashboard-realm-group:first-child {
  border-top: 0;
  padding-top: 0;
}

.dashboard-realm-title {
  margin: 0 0 0.5rem;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-soft);
}

.dashboard-realm-tabs {
  overflow-x: auto;
  overflow-y: hidden;
  flex-wrap: nowrap;
  scrollbar-width: thin;
}

.dashboard-realm-tabs .nav-link,
.dashboard-events-tabs .nav-link {
  white-space: nowrap;
  font-size: 0.78rem;
  padding: 0.32rem 0.6rem;
}

.dashboard-realm-tab-content {
  margin-top: 0.35rem;
}

.dashboard-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.dashboard-realm-badge {
  max-width: 58%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-events-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.45rem;
}

.dashboard-event-item {
  border: 1px solid rgba(217, 181, 107, 0.14);
  border-radius: 9px;
  background: rgba(12, 16, 20, 0.5);
  padding: 0.45rem 0.55rem;
}

.dashboard-event-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.dashboard-event-type {
  font-size: 0.68rem;
  letter-spacing: 0.02em;
}

.dashboard-event-time {
  font-size: 0.72rem;
  white-space: nowrap;
}

.dashboard-event-message {
  margin-top: 0.24rem;
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.35;
}

.dashboard-event-name {
  font-weight: 700;
  color: inherit;
}

.dashboard-event-empty {
  border-style: dashed;
}

.dashboard-events-pagination {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.dashboard-events-pagination .btn {
  min-width: 2rem;
}

.dashboard-events-ellipsis {
  color: var(--muted-soft);
  padding: 0 0.15rem;
}

/* ============================================================
   Auction House Search
   ============================================================ */

.ah-shell {
  align-items: start;
}

.ah-search-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.ah-search-row .form-control {
  min-width: 0;
}

.ah-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.ah-results-list {
  display: grid;
  gap: 0.45rem;
}

.ah-result-row {
  width: 100%;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
  text-align: left;
  border: 1px solid rgba(217, 181, 107, 0.18);
  border-radius: 10px;
  background: rgba(9, 13, 18, 0.52);
  color: var(--text);
  padding: 0.55rem 0.65rem;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.ah-result-row:hover,
.ah-result-row:focus,
.ah-result-row.active {
  background: rgba(217, 181, 107, 0.1);
  border-color: rgba(217, 181, 107, 0.42);
  outline: none;
}

.ah-result-row.active {
  box-shadow: inset 0 0 0 1px rgba(217, 181, 107, 0.22);
}

.ah-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 7px;
  object-fit: cover;
  border: 1px solid rgba(217, 181, 107, 0.28);
  background: rgba(0, 0, 0, 0.45);
}

.ah-item-icon-lg {
  width: 52px;
  height: 52px;
  border-radius: 9px;
}

.ah-result-main {
  min-width: 0;
  display: grid;
  gap: 0.08rem;
}

.ah-result-name {
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ah-result-meta {
  color: var(--muted-soft);
  font-size: 0.84rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ah-result-price {
  display: grid;
  justify-items: end;
  gap: 0.08rem;
  color: var(--amber-strong);
  font-weight: 800;
  white-space: nowrap;
}

.ah-result-price small {
  color: var(--muted-soft);
  font-weight: 600;
}

.ah-empty-state {
  color: var(--muted-soft);
  border: 1px dashed rgba(217, 181, 107, 0.25);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  background: rgba(9, 13, 18, 0.32);
}

.ah-detail-card {
  position: sticky;
  top: calc(var(--header-height) + 1rem);
}

.ah-detail-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.ah-detail-name {
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1.15;
}

.ah-price-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.ah-price-box {
  border: 1px solid rgba(217, 181, 107, 0.18);
  border-radius: 10px;
  background: rgba(9, 13, 18, 0.44);
  padding: 0.65rem;
}

.ah-price-label {
  color: var(--muted-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ah-price-value {
  color: var(--text-strong);
  font-size: 1rem;
  font-weight: 800;
  margin-top: 0.15rem;
}

.ah-price-time {
  font-size: 0.88rem;
}

.ah-tooltip {
  border: 1px solid rgba(217, 181, 107, 0.2);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.42);
  padding: 0.75rem;
}

.ah-tooltip-line {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.32;
}

.ah-tooltip-line + .ah-tooltip-line {
  margin-top: 0.22rem;
}

.wow-quality-poor {
  color: #9d9d9d !important;
}

.wow-quality-common {
  color: #ffffff !important;
}

.wow-quality-uncommon {
  color: #1eff00 !important;
}

.wow-quality-rare {
  color: #0070dd !important;
}

.wow-quality-epic {
  color: #a335ee !important;
}

.wow-quality-legendary {
  color: #ff8000 !important;
}

.wow-quality-artifact {
  color: #e6cc80 !important;
}

@media (max-width: 991px) {
  .ah-search-row {
    flex-direction: column;
    align-items: stretch;
  }

  .ah-result-row {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .ah-result-price {
    grid-column: 2;
    justify-items: start;
  }

  .ah-price-grid {
    grid-template-columns: 1fr;
  }

  .ah-detail-card {
    position: static;
  }
}

/* ============================================================
   Admin / Pagination
   ============================================================ */

.admin-tab-content {
  padding-top: 1rem;
}

.admin-tab-pane {
  display: none;
}

.admin-tab-pane.is-active {
  display: block;
}

.admin-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.85rem;
}

#adminStats .well-container {
  height: 100%;
}

#adminEditorFields .form-check {
  margin-bottom: 0.35rem;
}

.admin-table,
.admin-table.table,
.table {
  --bs-table-color: var(--text);
  --bs-table-bg: transparent;
  --bs-table-border-color: rgba(217, 181, 107, 0.14);
  --bs-table-striped-color: var(--text);
  --bs-table-striped-bg: rgba(217, 181, 107, 0.04);
  --bs-table-hover-color: var(--text-strong);
  --bs-table-hover-bg: rgba(217, 181, 107, 0.08);

  color: var(--text);
  background: transparent;
}

.admin-table th,
.admin-table td,
.table th,
.table td {
  color: var(--text);
  background: transparent;
  border-bottom-color: rgba(217, 181, 107, 0.14);
  white-space: nowrap;
  vertical-align: middle;
}

.admin-table td {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-table thead th,
.table thead th {
  color: var(--text-strong);
  border-bottom-color: rgba(217, 181, 107, 0.28);
}

.admin-table .text-muted,
.table .text-muted {
  color: var(--muted-soft) !important;
}

.admin-table .btn-outline-danger {
  color: #ff9b9b;
  border-color: rgba(239, 68, 68, 0.45);
}

.admin-table .btn-outline-danger:hover {
  color: #fff;
  background: rgba(239, 68, 68, 0.85);
  border-color: rgba(239, 68, 68, 0.9);
}

.admin-table tbody tr.admin-row-discord-left td {
  opacity: 0.48;
}

.admin-table tbody tr.admin-row-discord-left:hover td {
  opacity: 0.7;
}

.dataTables_wrapper,
.dt-container {
  color: var(--text);
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate,
.dt-container .dt-length,
.dt-container .dt-search,
.dt-container .dt-info,
.dt-container .dt-paging {
  color: var(--muted);
  margin-bottom: 0.65rem;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input,
.dt-container .dt-length select,
.dt-container .dt-search input {
  border: 1px solid rgba(217, 181, 107, 0.35);
  border-radius: 8px;
  background: rgba(10, 14, 19, 0.92);
  color: var(--text);
  padding: 0.2rem 0.45rem;
}

.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus,
.dt-container .dt-search input:focus,
.dt-container .dt-length select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(217, 181, 107, 0.2);
  border-color: rgba(217, 181, 107, 0.62);
}

.dataTables_wrapper .dataTables_paginate .paginate_button,
.dt-container .dt-paging .dt-paging-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.65rem;
  height: 1.65rem;
  padding: 0 0.38rem !important;
  margin: 0 0.15rem !important;
  font-size: 0.74rem !important;
  line-height: 1 !important;
  font-weight: 600 !important;
  border: 1px solid rgba(217, 181, 107, 0.28) !important;
  border-radius: 7px;
  background: rgba(12, 16, 20, 0.82) !important;
  color: var(--text) !important;
  box-shadow: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button span,
.dt-container .dt-paging .dt-paging-button span {
  color: inherit !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.previous,
.dataTables_wrapper .dataTables_paginate .paginate_button.next,
.dt-container .dt-paging .dt-paging-button.previous,
.dt-container .dt-paging .dt-paging-button.next {
  color: var(--amber-strong) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover,
.dt-container .dt-paging .dt-paging-button:hover {
  border-color: rgba(217, 181, 107, 0.55) !important;
  background: rgba(217, 181, 107, 0.14) !important;
  color: var(--amber-strong) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dt-container .dt-paging .dt-paging-button.current {
  border-color: rgba(217, 181, 107, 0.7) !important;
  background: rgba(217, 181, 107, 0.24) !important;
  color: var(--text-strong) !important;
}

.admin-embed-card {
  border: 1px solid rgba(217, 181, 107, 0.2);
}

.admin-embed-payload {
  min-height: 210px;
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 0.82rem;
}

.admin-embed-tool .discord-preview {
  background: #1e1f22;
  border: 1px solid #2b3035;
  border-radius: 12px;
  padding: 12px;
  min-height: 120px;
  font-family: "gg sans", "Whitney", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.admin-embed-tool .discord-preview-message {
  color: #dbdee1;
  font-size: 0.9rem;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.admin-embed-tool .discord-preview-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #3f434a;
}

.admin-embed-tool .discord-preview-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.admin-embed-tool .discord-preview-header {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.2;
}

.admin-embed-tool .discord-preview-username {
  font-weight: 600;
  color: #f2f3f5;
}

.admin-embed-tool .discord-preview-timestamp {
  font-size: 0.75rem;
  color: #949ba4;
}

.admin-embed-tool .discord-preview-content {
  white-space: pre-wrap;
  line-height: 1.4;
}

.admin-embed-tool .discord-embed {
  background: #2b2d31;
  border-left: 4px solid #5865f2;
  border-radius: 4px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.admin-embed-tool .discord-embed-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-embed-tool .discord-embed-author {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #b9bbbe;
}

.admin-embed-tool .discord-embed-author img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.admin-embed-tool .discord-embed-title {
  font-weight: 600;
  color: #ffffff;
}

.admin-embed-tool .discord-embed-title a {
  color: inherit;
  text-decoration: none;
}

.admin-embed-tool .discord-embed-description {
  color: #dbdee1;
  font-size: 0.85rem;
  line-height: 1.4;
}

.admin-embed-tool .discord-embed-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.admin-embed-tool .discord-embed-field.full {
  grid-column: 1 / -1;
}

.admin-embed-tool .discord-embed-field-name {
  font-weight: 600;
  font-size: 0.78rem;
  color: #ffffff;
  margin-bottom: 2px;
}

.admin-embed-tool .discord-embed-field-value {
  font-size: 0.78rem;
  color: #dbdee1;
}

.admin-embed-tool .discord-embed-thumbnail {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
}

.admin-embed-tool .discord-embed-image {
  width: 100%;
  border-radius: 6px;
  margin-top: 6px;
}

.admin-embed-tool .discord-embed-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: #b9bbbe;
}

.admin-embed-tool .discord-embed-footer img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.admin-embed-tool .discord-preview-note {
  font-size: 0.75rem;
  color: #b9bbbe;
  border-top: 1px dashed #3a3d42;
  padding-top: 6px;
}

.admin-embed-tool .identity-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  background: #3f434a;
}

.admin-embed-tool .history-item {
  padding: 10px;
  border: 1px solid #2b3035;
  border-radius: 8px;
  background: #1f2428;
}

@media (max-width: 991px) {
  .admin-embed-tool .discord-embed-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .admin-embed-tool .discord-embed-fields {
    grid-template-columns: 1fr;
  }
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dt-container .dt-paging .dt-paging-button.disabled {
  opacity: 0.45 !important;
  color: var(--muted-soft) !important;
}

.dataTables_wrapper .dataTables_processing,
.dt-container .dt-processing {
  display: none !important;
}

.alert {
  color: var(--text);
  border-color: rgba(217, 181, 107, 0.24);
}

.alert-success {
  background: rgba(34, 197, 94, 0.12);
}

.alert-danger {
  background: rgba(239, 68, 68, 0.12);
}

.alert-warning {
  background: rgba(217, 181, 107, 0.22);
  border-color: rgba(217, 181, 107, 0.46);
  color: #2b1d0d;
}

.alert-secondary {
  background: rgba(148, 163, 184, 0.16);
  border-color: rgba(148, 163, 184, 0.36);
  color: var(--text);
}

.alert-info {
  background: rgba(96, 165, 250, 0.18);
  border-color: rgba(96, 165, 250, 0.45);
  color: #e8f1ff;
}

.modal-backdrop {
  z-index: 1190;
}

.form-switch .form-check-input {
  width: 2.2rem;
  height: 1.2rem;
  background-color: rgba(255, 255, 255, 0.12);
  border-color: rgba(217, 181, 107, 0.45);
  --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23131a23'/%3e%3c/svg%3e");
  background-position: left center;
  background-repeat: no-repeat;
  background-size: contain;
  box-shadow: none;
}

.form-switch .form-check-input:focus {
  border-color: rgba(217, 181, 107, 0.65);
  box-shadow: 0 0 0 0.18rem rgba(217, 181, 107, 0.2);
}

.form-switch .form-check-input:checked {
  background-color: rgba(217, 181, 107, 0.72);
  border-color: rgba(217, 181, 107, 0.72);
  --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff7df'/%3e%3c/svg%3e");
  background-position: right center;
}

.form-switch .form-check-input:disabled {
  opacity: 0.45;
}

.modal {
  z-index: 1200;
}

#adminEditorModal .modal-dialog {
  margin-top: calc(var(--header-height) + 1.25rem);
}

@media (max-width: 575px) {
  #adminEditorModal .modal-dialog {
    margin-top: calc(var(--header-height) + 0.75rem);
  }
}


/* ============================================================
   Typeahead / Small UI Helpers
   ============================================================ */

.typeahead-wrap {
  position: relative;
  flex: 1;
}

.typeahead-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: rgba(12, 16, 20, 0.96);
  border: 1px solid rgba(217, 181, 107, 0.3);
  border-radius: 8px;
  padding: 0.35rem;
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 180px;
  overflow-y: auto;
  z-index: 20;
}

.typeahead-list.is-open {
  display: flex;
}

.typeahead-item {
  background: transparent;
  border: 1px solid rgba(217, 181, 107, 0.2);
  border-radius: 6px;
  color: var(--text);
  text-align: left;
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
}

.typeahead-item:hover {
  border-color: rgba(217, 181, 107, 0.6);
  color: var(--amber-strong);
}

/* ============================================================
   Realm Feature Pages
   ============================================================ */

.feature-hero-card .card-body {
  padding-top: 1.05rem;
  padding-bottom: 1.05rem;
}

.feature-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.armory-search-form {
  display: grid;
  gap: 0.55rem;
}

.armory-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
}

.armory-stat-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-soft);
}

.armory-stat-value {
  font-weight: 700;
  color: var(--text-strong);
  margin-top: 0.15rem;
}

.armory-paperdoll {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(160px, 1fr) 64px;
  grid-template-rows: auto auto;
  gap: 0.65rem 1rem;
  align-items: start;
  max-width: 460px;
  margin: 0 auto;
}

.armory-paperdoll-column {
  display: grid;
  gap: 0.55rem;
}

.armory-paperdoll-center {
  min-height: 420px;
  border: 1px solid rgba(217, 181, 107, 0.18);
  border-radius: 12px;
  background:
    radial-gradient(260px 180px at 50% 28%, rgba(217, 181, 107, 0.12), transparent 64%),
    linear-gradient(180deg, rgba(8, 12, 17, 0.92), rgba(10, 15, 22, 0.84));
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.38);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.6rem;
}

.armory-paperdoll-center-info {
  width: 100%;
  text-align: center;
  background: rgba(8, 12, 17, 0.52);
  border: 1px solid rgba(217, 181, 107, 0.22);
  border-radius: 10px;
  padding: 0.7rem 0.55rem;
}

.armory-center-name {
  font-family: "Cinzel", "Source Sans 3", serif;
  font-size: 1.08rem;
  color: var(--text-strong);
  letter-spacing: 0.02em;
  font-weight: 800;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.armory-center-meta {
  font-size: 0.83rem;
  color: var(--text);
  line-height: 1.3;
}

.armory-center-updated {
  margin-top: 0.35rem;
  font-size: 0.74rem;
  color: var(--muted-soft);
}

.armory-presence.is-cached {
  color: var(--amber-strong);
}

.armory-presence.is-online {
  color: #4ade80;
}

.armory-presence.is-offline {
  color: #ef4444;
}

.armory-paperdoll-bottom {
  grid-column: 1 / span 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding-top: 0.25rem;
}

.armory-slot {
  width: 54px;
  height: 54px;
  border-radius: 6px;
  background: rgba(10, 14, 19, 0.95);
  border: 2px solid #7a7a7a;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.68);
  overflow: hidden;
}

.armory-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.armory-slot.is-empty {
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.55);
  background: rgba(12, 17, 24, 0.86);
}

.armory-slot.quality-0 { border-color: #9ca3af; }
.armory-slot.quality-1 { border-color: #e5e7eb; }
.armory-slot.quality-2 { border-color: #4ade80; }
.armory-slot.quality-3 { border-color: #60a5fa; }
.armory-slot.quality-4 { border-color: #c084fc; }
.armory-slot.quality-5 { border-color: #fbbf24; }
.armory-slot.quality-6 { border-color: #f97316; }

.item-tooltip,
.armory-tooltip {
  position: fixed;
  z-index: 1600;
  min-width: 170px;
  max-width: 260px;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(96, 165, 250, 0.45);
  background: rgba(7, 10, 14, 0.96);
  color: var(--text);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.48);
  pointer-events: none;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 70ms ease-out, transform 70ms ease-out;
}

.item-tooltip.is-visible,
.armory-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.item-tooltip-name,
.armory-tooltip-name {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.item-tooltip-line,
.armory-tooltip-line {
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.25;
}

.item-tooltip-id,
.armory-tooltip-id {
  color: var(--muted-soft);
}

.item-tooltip-line + .item-tooltip-line {
  margin-top: 0.1rem;
}

.item-tooltip-line-meta {
  color: var(--muted-soft);
}

.item-tooltip-line-format-misc {
  color: var(--muted-soft);
}

.item-tooltip-line-format-indent {
  padding-left: 0.7rem;
}

.item-tooltip-line-format-alignright {
  text-align: right;
  color: var(--muted-soft);
}

.item-tooltip-line-format-poor {
  color: #9d9d9d;
}

.item-tooltip-line-format-common {
  color: #ffffff;
}

.item-tooltip-line-format-uncommon {
  color: #1eff00;
}

.item-tooltip-line-format-rare {
  color: #0070dd;
}

.item-tooltip-line-format-epic {
  color: #a335ee;
}

.item-tooltip-line-format-legendary {
  color: #ff8000;
}

.item-tooltip-line-format-artifact {
  color: #e6cc80;
}

.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.quick-link-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid rgba(217, 181, 107, 0.22);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  background: rgba(10, 14, 19, 0.66);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.quick-link-card:hover {
  color: var(--amber-strong);
  border-color: rgba(217, 181, 107, 0.5);
  background: rgba(217, 181, 107, 0.09);
  text-decoration: none;
}

.loot-item-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.loot-result-row .ah-result-name {
  text-decoration: none;
}

.loot-result-row .ah-result-name:hover {
  text-decoration: underline;
}

.loot-result-source {
  min-width: 190px;
}

.loot-result-source small {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.loot-filters-bar {
  border: 1px solid rgba(217, 181, 107, 0.2);
  border-radius: 10px;
  background: rgba(9, 13, 18, 0.55);
  padding: 0.7rem 0.75rem;
}

.loot-filters-row {
  display: grid;
  gap: 0.55rem 0.7rem;
}

.loot-filters-row + .loot-filters-row {
  margin-top: 0.6rem;
}

.loot-filters-row-primary {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.loot-filters-row-context {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem 0.7rem;
}

.loot-filter-item .form-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-soft);
  margin-bottom: 0.25rem;
}

.loot-filter-item .form-control {
  min-height: 34px;
  font-size: 0.84rem;
}

.loot-filter-item.d-none {
  display: none !important;
}

.loot-filter-item-actions {
  display: flex;
  align-items: flex-end;
}

.loot-item-cell img {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid rgba(217, 181, 107, 0.2);
}

.loot-item-cell span {
  min-width: 0;
}

.loot-item-link-icon {
  display: inline-flex;
  line-height: 0;
}

.loot-item-link-name {
  min-width: 0;
  text-decoration: none;
  font-weight: 700;
}

.loot-item-link-name:hover {
  color: inherit;
  text-decoration: underline;
}

.loot-quality {
  font-weight: 700;
}

.loot-item-cell.quality-0 span,
.loot-item-link-name.quality-0,
.loot-quality.quality-0 {
  color: #9d9d9d;
}

.loot-item-cell.quality-1 span,
.loot-item-link-name.quality-1,
.loot-quality.quality-1 {
  color: #ffffff;
}

.loot-item-cell.quality-2 span,
.loot-item-link-name.quality-2,
.loot-quality.quality-2 {
  color: #1eff00;
}

.loot-item-cell.quality-3 span,
.loot-item-link-name.quality-3,
.loot-quality.quality-3 {
  color: #0070dd;
}

.loot-item-cell.quality-4 span,
.loot-item-link-name.quality-4,
.loot-quality.quality-4 {
  color: #a335ee;
}

.loot-item-cell.quality-5 span,
.loot-item-link-name.quality-5,
.loot-quality.quality-5 {
  color: #ff8000;
}

.loot-item-cell.quality-6 span,
.loot-item-link-name.quality-6,
.loot-quality.quality-6 {
  color: #e6cc80;
}

@media (max-width: 1400px) {
  .loot-filters-row-primary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .loot-filters-row-context {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .loot-filters-row-primary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .loot-filters-row-context {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .loot-filters-row-primary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .loot-filters-row-context {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .loot-filters-row-primary,
  .loot-filters-row-context {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   WoW Class Colors
   ============================================================ */

.wow-class-druid { color: #ff7d0a !important; }
.wow-class-hunter { color: #abd473 !important; }
.wow-class-mage { color: #69ccf0 !important; }
.wow-class-paladin { color: #f58cba !important; }
.wow-class-priest { color: #ffffff !important; }
.wow-class-rogue { color: #fff569 !important; }
.wow-class-shaman { color: #0070de !important; }
.wow-class-warrior { color: #c79c6e !important; }
.wow-class-warlock { color: #9482c9 !important; }
.wow-class-death-knight { color: #c41f3b !important; }
.wow-class-unknown { color: var(--text) !important; }

/* Slight boost for readability on dark surfaces. */
.wow-class-druid,
.wow-class-hunter,
.wow-class-mage,
.wow-class-paladin,
.wow-class-priest,
.wow-class-rogue,
.wow-class-shaman,
.wow-class-warrior,
.wow-class-warlock,
.wow-class-death-knight {
  font-weight: 600;
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.45);
}

/* ============================================================
   Capy Community Admin
   ============================================================ */

.community-admin-page {
  min-width: 0;
}

.community-admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.community-admin-title {
  font-size: 1.75rem;
  line-height: 1.15;
}

.community-admin-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

.community-admin-stat {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.85rem;
  text-align: center;
}

.community-admin-stat strong {
  color: var(--text-strong);
  font-size: 1.35rem;
}

.community-admin-directory-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.community-admin-pane {
  display: none;
}

.community-admin-pane.is-active {
  display: block;
}

.community-admin-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.65rem;
  width: 100%;
}

.community-admin-filters label {
  display: grid;
  gap: 0.2rem;
  min-width: 140px;
  color: var(--muted-soft);
  font-size: 0.78rem;
}

.community-admin-filters .btn {
  min-height: 31px;
}

.community-admin-identity,
.community-admin-character {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.community-admin-identity > span:last-child {
  display: grid;
  min-width: 0;
}

.community-admin-identity small {
  color: var(--muted-soft);
}

.community-admin-avatar,
.community-admin-detail-avatar {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  object-fit: cover;
  background: var(--panel-soft);
  border: 1px solid var(--panel-border);
}

.community-admin-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.community-admin-detail-avatar {
  width: 72px;
  height: 72px;
  border-radius: 6px;
  font-size: 1.4rem;
}

.community-admin-class-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 3px;
}

.community-admin-member-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--panel-border);
}

.community-admin-member-summary h3 {
  margin: 0;
  font-size: 1.25rem;
}

.community-admin-detail-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 1rem 0;
}

.community-admin-detail-meta > div {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.community-admin-detail-meta span {
  color: var(--muted-soft);
  font-size: 0.78rem;
}

.community-admin-detail-meta strong {
  overflow-wrap: anywhere;
}

.community-admin-section-title {
  margin: 0.5rem 0 0.75rem;
  font-size: 1rem;
}

.community-admin-loading,
.community-admin-empty {
  padding: 2rem 1rem;
  color: var(--muted-soft);
  text-align: center;
}

.community-admin-status {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  max-width: 560px;
  margin: 8vh auto 0;
  padding: 2rem;
  text-align: center;
}

.community-admin-status > i {
  color: var(--amber-strong);
  font-size: 2rem;
}

.community-admin-status h1,
.community-admin-status p {
  margin: 0;
}

@media (max-width: 960px) {
  .community-admin-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .community-admin-detail-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .community-admin-header,
  .community-admin-directory-header {
    align-items: stretch;
    flex-direction: column;
  }

  .community-admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .community-admin-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .community-admin-filters label {
    min-width: 0;
  }

  .community-admin-member-summary {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .community-admin-member-state {
    grid-column: 1 / -1;
  }
}

/* ============================================================
   Item Quality Colors
   ============================================================ */

.quality-0 { color: #9d9d9d; }
.quality-1 { color: #ffffff; }
.quality-2 { color: #1eff00; }
.quality-3 { color: #0070dd; }
.quality-4 { color: #a335ee; }
.quality-5 { color: #ff8000; }
.quality-6 { color: #e6cc80; }
.quality-unknown { color: var(--text); }

/* ============================================================
   Gear Lists
   ============================================================ */

.gear-create-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.gear-index-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.gear-index-toolbar .btn.is-active {
  background: rgba(217, 181, 107, 0.2);
  border-color: rgba(217, 181, 107, 0.6);
  color: var(--text-strong);
}

.gear-index-list {
  display: grid;
  gap: 0.55rem;
}

.gear-index-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  border: 1px solid rgba(217, 181, 107, 0.18);
  border-radius: 10px;
  background: rgba(9, 13, 18, 0.52);
  padding: 0.65rem 0.75rem;
}

.gear-index-card-main {
  color: inherit;
  text-decoration: none;
}

.gear-index-card-main:hover .gear-index-card-title {
  color: var(--amber-strong);
}

.gear-index-card-main:hover,
.gear-index-card-main:focus,
.gear-index-card-main:active,
.gear-index-card-main:hover .gear-index-card-title,
.gear-index-card-main:focus .gear-index-card-title,
.gear-index-card-main:active .gear-index-card-title {
  text-decoration: none !important;
}

.gear-index-card-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-strong);
}

.gear-index-card-meta {
  line-height: 1.35;
}

.gear-index-card-side {
  display: grid;
  gap: 0.5rem;
  justify-items: end;
}

.gear-index-owner {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 0.5rem;
  align-items: center;
}

.gear-index-owner-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(217, 181, 107, 0.32);
  background: rgba(10, 14, 19, 0.9);
}

.gear-index-owner-name {
  font-weight: 700;
  font-size: 0.86rem;
  line-height: 1.15;
}

.gear-index-owner-meta {
  color: var(--muted-soft);
  font-size: 0.72rem;
  line-height: 1.1;
}

.gear-index-pill {
  border: 1px solid rgba(217, 181, 107, 0.35);
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  color: var(--muted-soft);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gear-shell {
  align-items: start;
}

.gear-paperdoll .armory-slot {
  position: relative;
  cursor: pointer;
}

.gear-paperdoll .armory-slot.is-owner {
  box-shadow: inset 0 0 0 1px rgba(217, 181, 107, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.6);
}

.gear-slot-plus {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 1.45rem;
  color: rgba(217, 181, 107, 0.78);
}

.gear-slot-external {
  position: absolute;
  right: 2px;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  font-size: 0.62rem;
  background: rgba(7, 10, 14, 0.84);
  border: 1px solid rgba(217, 181, 107, 0.42);
  color: var(--amber-strong);
  text-decoration: none;
}

.gear-slot-external:hover {
  background: rgba(217, 181, 107, 0.15);
  color: var(--amber-strong);
  text-decoration: none;
}

.gear-summary-list {
  display: grid;
  gap: 0.45rem;
}

.gear-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid rgba(217, 181, 107, 0.18);
  border-radius: 9px;
  background: rgba(9, 13, 18, 0.48);
  padding: 0.45rem 0.55rem;
}

.gear-summary-row strong {
  color: var(--amber-strong);
  font-size: 0.92rem;
}

.gear-summary-effects {
  display: grid;
  gap: 0.35rem;
}

.gear-effect-line {
  font-size: 0.87rem;
  line-height: 1.35;
  color: var(--muted);
  border-left: 2px solid rgba(217, 181, 107, 0.32);
  padding-left: 0.5rem;
}

.gear-slot-modal-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.gear-slot-search-results {
  display: grid;
  gap: 0.45rem;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 0.1rem;
}

.gear-slot-result-row {
  width: 100%;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  border: 1px solid rgba(217, 181, 107, 0.18);
  border-radius: 10px;
  background: rgba(10, 14, 19, 0.7);
  color: var(--text);
  text-align: left;
  padding: 0.5rem 0.6rem;
}

.gear-slot-result-row:hover,
.gear-slot-result-row:focus {
  border-color: rgba(217, 181, 107, 0.5);
  background: rgba(217, 181, 107, 0.1);
  outline: none;
}

.gear-slot-result-main {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}

.gear-slot-result-link {
  color: var(--amber-strong);
  font-size: 0.88rem;
}

@media (max-width: 1200px) {
  .gear-create-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gear-slot-modal-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .gear-index-card {
    grid-template-columns: 1fr;
  }

  .gear-index-card-side {
    justify-items: start;
  }

  .gear-create-grid,
  .gear-slot-modal-controls {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Guides
   ============================================================ */

.guides-home-shell {
  align-items: start;
}

.guide-home-no-side {
  grid-template-columns: 1fr;
}

.guides-list-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.guides-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.guides-list-sort {
  min-width: 220px;
}

.guides-include-switch {
  margin-bottom: 0.4rem;
}

.guides-card {
  border: 1px solid rgba(217, 181, 107, 0.2);
  border-radius: 12px;
  background: rgba(10, 14, 19, 0.66);
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.6rem;
}

.guides-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
}

.guides-head-main {
  min-width: 0;
}

.guides-title {
  color: var(--text-strong);
  font-weight: 700;
  font-size: 1.01rem;
  line-height: 1.2;
  text-decoration: none;
}

.guides-title:hover,
.guides-title:focus,
.guides-title:active {
  color: var(--amber-strong);
  text-decoration: none;
}

.guides-meta {
  margin-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--muted-soft);
}

.guides-vote-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid rgba(217, 181, 107, 0.2);
  border-radius: 999px;
  background: rgba(217, 181, 107, 0.1);
  color: var(--amber-strong);
  padding: 0.12rem 0.45rem;
}

.guides-summary {
  margin-top: 0.5rem;
  color: var(--muted);
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.guides-pagination {
  margin-top: 0.7rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.guide-detail-shell {
  grid-template-columns: minmax(0, 1fr);
}

.guide-vote-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  border: 1px solid rgba(217, 181, 107, 0.2);
  border-radius: 10px;
  background: rgba(10, 14, 19, 0.58);
  padding: 0.5rem 0.6rem;
}

.guide-vote-buttons {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.guide-vote-buttons .btn.active {
  border-color: rgba(217, 181, 107, 0.65);
  background: rgba(217, 181, 107, 0.14);
  color: var(--amber-strong);
}

.guide-block-editorjs {
  margin-bottom: 0.8rem;
}

.guide-block-editorjs h1,
.guide-block-editorjs h2,
.guide-block-editorjs h3,
.guide-block-editorjs h4,
.guide-block-editorjs h5,
.guide-block-editorjs h6 {
  color: var(--text-strong);
}

.guide-block-editorjs p,
.guide-block-editorjs li,
.guide-block-editorjs blockquote,
.guide-block-editorjs code {
  color: var(--text);
}

.guide-block-editorjs a {
  color: var(--amber-strong);
}

.guide-warning {
  border: 1px solid rgba(217, 181, 107, 0.33);
  border-radius: 10px;
  background: rgba(217, 181, 107, 0.1);
  color: var(--text);
  padding: 0.55rem 0.65rem;
}

.guide-warning strong {
  color: var(--amber-strong);
}

.guide-warning p {
  margin: 0.3rem 0 0;
}

.guide-image-figure {
  margin: 0;
}

.guide-image-figure img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  border-radius: 10px;
  border: 1px solid rgba(217, 181, 107, 0.24);
}

.guide-block-image img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
}

.guide-image-figure figcaption {
  margin-top: 0.35rem;
  color: var(--muted-soft);
  font-size: 0.82rem;
}

.yt-embed {
  position: relative;
  width: min(100%, 720px);
  aspect-ratio: 16 / 9;
  height: auto;
  padding-top: 0;
  display: block;
  max-height: calc(720px * 9 / 16);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(217, 181, 107, 0.24);
  background: rgba(9, 13, 18, 0.75);
}

.yt-embed::before {
  content: "";
  display: none;
}

.yt-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@supports not (aspect-ratio: 16 / 9) {
  .yt-embed {
    width: 100%;
    max-width: 720px;
    aspect-ratio: auto;
    height: auto;
    padding-top: 0;
    max-height: none;
  }

  .yt-embed::before {
    display: block;
    padding-top: 56.25%;
    content: "";
  }
}

.guide-comment-list {
  display: grid;
  gap: 0.5rem;
}

.guide-comment-item {
  border: 1px solid rgba(217, 181, 107, 0.18);
  border-radius: 10px;
  background: rgba(10, 14, 19, 0.58);
  padding: 0.5rem 0.6rem;
}

.guide-comment-item.depth-1,
.guide-comment-item.depth-2 {
  margin-top: 0.45rem;
  margin-left: 1rem;
}

.comment-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: var(--muted-soft);
}

.comment-action {
  border: 0;
  background: transparent;
  color: var(--amber-strong);
  font-size: 0.75rem;
  padding: 0;
}

.comment-action:hover {
  color: var(--amber);
}

.comment-body {
  margin-top: 0.35rem;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-body a {
  color: var(--amber-strong);
}

.guide-comment-replies {
  margin-left: 0.5rem;
}

.guide-reply-form {
  margin-top: 0.45rem;
}

.guide-editor-canvas {
  border: 1px solid rgba(217, 181, 107, 0.2);
  border-radius: 12px;
  padding: 0.7rem;
  background: rgba(9, 13, 18, 0.6);
}

.guide-editor-canvas .codex-editor__redactor {
  padding-bottom: 0 !important;
}

.guide-editor-canvas .ce-block__content,
.guide-editor-canvas .ce-toolbar__content {
  max-width: 100%;
}

.guide-editor-canvas .ce-toolbar__plus,
.guide-editor-canvas .ce-toolbar__settings-btn {
  color: var(--amber-strong) !important;
  background: rgba(217, 181, 107, 0.2) !important;
  border: 1px solid rgba(217, 181, 107, 0.62) !important;
  border-radius: 8px !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35) inset;
}

.guide-editor-canvas .ce-toolbar__plus:hover,
.guide-editor-canvas .ce-toolbar__settings-btn:hover,
.guide-editor-canvas .ce-toolbar__plus:focus,
.guide-editor-canvas .ce-toolbar__settings-btn:focus {
  color: #ffe8b3 !important;
  background: rgba(217, 181, 107, 0.3) !important;
  border-color: rgba(217, 181, 107, 0.9) !important;
  box-shadow: 0 0 0 2px rgba(217, 181, 107, 0.22);
}

.guide-editor-canvas .ce-toolbar__settings-btn svg,
.guide-editor-canvas .ce-toolbar__plus svg {
  fill: currentColor !important;
}

.guide-inline-tool {
  display: grid;
  gap: 0.4rem;
}

.guide-inline-tool-hint {
  font-size: 0.78rem;
  color: var(--muted-soft);
}

.guide-image-host-trigger {
  cursor: pointer;
  text-decoration: underline dotted rgba(217, 181, 107, 0.5);
}

.guide-image-host-trigger:hover,
#guideImageHostInfo:hover {
  color: var(--amber-strong);
}

.guide-editor-host-popup {
  position: absolute;
  z-index: 1400;
  width: min(320px, calc(100vw - 24px));
  transform: translateX(-50%);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: rgba(9, 13, 18, 0.98);
  box-shadow: var(--shadow-panel);
  padding: 0.65rem 0.7rem;
}

.guide-editor-host-popup-title {
  color: var(--text-strong);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.guide-editor-host-popup-list {
  margin: 0 0 0.4rem;
  padding-left: 1rem;
  color: var(--muted);
  font-size: 0.8rem;
  display: grid;
  gap: 0.15rem;
}

.guide-editor-host-popup-tip {
  color: var(--muted-soft);
  font-size: 0.75rem;
}

@media (max-width: 700px) {
  .guides-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .guide-comment-item.depth-1,
  .guide-comment-item.depth-2 {
    margin-left: 0.45rem;
  }
}

/* ============================================================
   Settings
   ============================================================ */

.settings-main-form {
  max-width: 720px;
}

.settings-main-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.settings-main-current {
  color: var(--muted-soft);
  font-size: 0.95rem;
}

/* ============================================================
   Guild App
   ============================================================ */

.guild-app-page .content {
  display: flex;
  justify-content: center;
}

.guild-app-lead {
  color: var(--muted);
  font-size: 1.03rem;
  margin-left: auto;
  margin-right: auto;
  max-width: 46ch;
}

.guild-app-shell {
  width: 100%;
  max-width: 760px;
}

.guild-app-download-card {
  background: linear-gradient(180deg, rgba(16, 20, 26, 0.9) 0%, rgba(12, 16, 21, 0.94) 100%);
  border: 1px solid rgba(217, 181, 107, 0.3);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.33);
}

.guild-app-download-body {
  padding: 1.65rem;
  text-align: center;
}

.guild-app-download-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.guild-app-download-btn {
  align-items: center;
  display: inline-flex;
  font-size: 1rem;
  font-weight: 700;
  gap: 0.5rem;
  justify-content: center;
  min-height: 52px;
}

.guild-app-features-card {
  background: rgba(14, 18, 24, 0.86);
  border: 1px solid rgba(217, 181, 107, 0.2);
}

.guild-app-feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.guild-app-feature-item {
  background: rgba(10, 14, 19, 0.66);
  border: 1px solid rgba(217, 181, 107, 0.16);
  border-radius: 10px;
  padding: 0.8rem 0.85rem;
}

.guild-app-feature-icon {
  align-items: center;
  background: rgba(217, 181, 107, 0.1);
  border: 1px solid rgba(217, 181, 107, 0.25);
  border-radius: 8px;
  color: var(--amber-strong);
  display: inline-flex;
  font-size: 0.9rem;
  height: 30px;
  justify-content: center;
  margin-bottom: 0.5rem;
  width: 30px;
}

.guild-app-feature-title {
  color: var(--text-strong);
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 0 0 0.25rem;
}

.guild-app-feature-text {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
  margin: 0;
}

.guild-app-feature-note {
  border-top: 1px solid rgba(217, 181, 107, 0.18);
  color: var(--muted-soft);
  font-size: 0.84rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
}

@media (max-width: 991px) {
  .guild-app-shell {
    max-width: 100%;
  }
}

@media (max-width: 767px) {
  .guild-app-download-actions {
    grid-template-columns: 1fr;
  }

  .guild-app-feature-grid {
    grid-template-columns: 1fr;
  }

  .guild-app-download-btn {
    width: 100%;
  }
}

/* ============================================================
   Legal Pages
   ============================================================ */

.legal-page {
  color: var(--text);
}

.legal-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.legal-header {
  padding: 1.5rem 0 2rem;
  border-bottom: 1px solid var(--panel-border);
}

.legal-kicker {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.55rem;
  color: var(--amber-strong);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.legal-header h1 {
  margin: 0;
  font-size: 2.5rem;
  line-height: 1.1;
}

.legal-summary {
  max-width: 760px;
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.legal-effective {
  margin: 0.8rem 0 0;
  color: var(--muted-soft);
  font-size: 0.9rem;
}

.legal-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 760px);
  gap: 3rem;
  justify-content: center;
  align-items: start;
  padding: 2rem 0 3rem;
}

.legal-toc {
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-left: 1rem;
  border-left: 2px solid var(--panel-border);
}

.legal-toc-title {
  margin: 0 0 0.45rem;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.legal-toc a {
  padding: 0.2rem 0;
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration: none;
}

.legal-toc a:hover,
.legal-toc a:focus-visible {
  color: var(--amber-strong);
}

.legal-article {
  min-width: 0;
}

.legal-article section {
  scroll-margin-top: calc(var(--header-height) + 1.5rem);
  padding: 0 0 1.75rem;
}

.legal-article section + section {
  padding-top: 0.25rem;
  border-top: 1px solid rgba(217, 181, 107, 0.16);
}

.legal-article h2 {
  margin: 1.5rem 0 0.75rem;
  font-size: 1.3rem;
  line-height: 1.35;
}

.legal-article h3 {
  margin: 1.15rem 0 0.4rem;
  font-size: 1rem;
  line-height: 1.4;
}

.legal-article p,
.legal-article li {
  color: var(--muted);
  line-height: 1.75;
}

.legal-article p {
  margin: 0 0 0.85rem;
}

.legal-article ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.legal-article li + li {
  margin-top: 0.35rem;
}

.legal-article a {
  color: var(--amber-strong);
  text-underline-offset: 0.18em;
}

.legal-article-footer {
  padding-top: 1.25rem;
  border-top: 1px solid var(--panel-border);
}

.legal-article-footer a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 900px) {
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .legal-toc {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 0 1.25rem;
    border-left: 0;
    border-bottom: 1px solid var(--panel-border);
  }

  .legal-toc-title {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .legal-header {
    padding-top: 0.5rem;
  }

  .legal-header h1 {
    font-size: 2rem;
  }

  .legal-summary {
    font-size: 1rem;
  }

  .legal-toc {
    grid-template-columns: 1fr;
  }

  .legal-article h2 {
    font-size: 1.18rem;
  }
}

/* ============================================================
   Footer
   ============================================================ */

.wrapper > .text-center:last-child,
.site-footer {
  margin-left: var(--sidebar-width);
  padding: 1rem 1.5rem 1.5rem;
  color: var(--muted-soft);
  font-size: 0.88rem;
}

.site-footer-disclaimer {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.site-footer a,
.site-footer-disclaimer a {
  color: var(--amber-strong);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer-disclaimer a:hover {
  color: var(--text-strong);
  text-decoration: underline;
}

/* ============================================================
   Sidebar Collapse / Responsive
   ============================================================ */

body.sidebar-collapsed .main-sidebar {
  transform: translateX(-100%);
}

body.sidebar-collapsed .content-wrapper,
body.sidebar-collapsed .site-banner,
body.sidebar-collapsed .site-footer {
  margin-left: 0;
}

@media (max-width: 991px) {
  .content-wrapper {
    margin-left: 0;
    padding: 1.25rem 1rem 2rem;
  }

  .main-sidebar {
    transform: translateX(-100%);
    display: block;
  }

  body.sidebar-open .main-sidebar {
    transform: translateX(0);
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: var(--header-height) 0 0 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1040;
  }

  body.sidebar-open .sidebar-overlay {
    display: block;
  }

  .site-banner,
  .wrapper > .text-center:last-child,
  .site-footer {
    margin-left: 0;
  }

  .dashboard-shell,
  .dashboard-shell.split-panels {
    grid-template-columns: 1fr;
  }

  .community-home-page .dashboard-side {
    order: -1;
  }

  .community-main-display {
    grid-template-columns: 1fr;
  }

  .dash-header,
  .profile-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .feed-images-3 {
    grid-template-columns: 1fr;
  }

  .feed-images-3 .feed-image-tile:nth-child(1) {
    grid-row: auto;
    min-height: clamp(180px, 34vh, 260px);
    max-height: clamp(180px, 34vh, 260px);
  }

  .feed-images-2 .feed-image-tile,
  .feed-images-3 .feed-image-tile,
  .feed-images-4 .feed-image-tile {
    min-height: clamp(140px, 25vh, 210px);
    max-height: clamp(140px, 25vh, 210px);
  }

  .feed-image-viewer-body {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .feed-image-viewer-nav {
    width: 2.2rem;
    height: 2.2rem;
    justify-self: center;
  }

  .feed-image-viewer-nav.prev {
    order: 2;
  }

  .feed-image-viewer-nav.next {
    order: 3;
  }

  .feed-image-viewer-frame {
    order: 1;
    min-height: min(62vh, 480px);
    max-height: min(62vh, 480px);
  }

  .feed-image-viewer-frame img {
    max-height: min(60vh, 460px);
  }
}

@media (max-width: 575px) {
  .main-header .nav-title {
    font-size: 0.75rem;
  }

  .content-wrapper {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .card-body {
    padding: 1rem;
  }

  .profile-name {
    font-size: 1.55rem;
  }

  .post-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .post-visibility {
    max-width: none;
  }

  .armory-search-row {
    grid-template-columns: 1fr;
  }

  .quick-links-grid {
    grid-template-columns: 1fr;
  }
}

.shellcoin-chart-wrap {
  position: relative;
  width: 100%;
  min-height: 460px;
}

@media (max-width: 991px) {
  .shellcoin-chart-wrap {
    min-height: 360px;
  }
}

/* Capycraft population directory */
.population-page .content {
  max-width: 1500px;
  margin: 0 auto;
}

.population-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0.4rem 0.15rem;
}

.population-header-main {
  min-width: 0;
}

.population-header-side {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 0.75rem;
  margin-left: auto;
}

.population-title {
  color: var(--text-strong);
  font-size: 1.75rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.population-view-tabs {
  display: inline-flex;
  gap: 0.4rem;
}

.population-view-tabs .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.population-realm-picker {
  width: min(100%, 260px);
}

.population-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  min-width: min(100%, 520px);
  border: 1px solid rgba(217, 181, 107, 0.22);
  border-radius: 8px;
  background: rgba(9, 13, 18, 0.52);
}

.population-stat {
  min-width: 0;
  padding: 0.65rem 0.8rem;
}

.population-stat + .population-stat {
  border-left: 1px solid rgba(217, 181, 107, 0.18);
}

.population-stat-label {
  display: block;
  margin-bottom: 0.12rem;
  color: var(--muted-soft);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

.population-stat strong {
  display: block;
  overflow: hidden;
  color: var(--text-strong);
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.population-directory {
  border-radius: 8px;
}

.population-filters {
  display: grid;
  grid-template-columns: minmax(150px, 1.35fr) minmax(150px, 1.35fr) repeat(2, minmax(115px, 0.9fr)) repeat(2, minmax(84px, 0.55fr)) minmax(130px, 0.9fr) minmax(185px, 1.1fr) 38px;
  align-items: end;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.population-filter {
  min-width: 0;
}

.population-filter .form-label {
  margin-bottom: 0.25rem;
  color: var(--muted-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

.population-filter .form-control {
  width: 100%;
  min-height: 36px;
  font-size: 0.84rem;
}

.population-filter-action {
  display: flex;
  align-items: flex-end;
}

.population-filter-toggle {
  display: flex;
  align-items: center;
  min-height: 36px;
}

.population-filter-toggle .form-check {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  min-width: 0;
  margin: 0;
}

.population-filter-toggle .form-check-input {
  flex: 0 0 auto;
  margin: 0;
}

.population-filter-toggle .form-check-label {
  color: var(--text);
  font-size: 0.82rem;
  letter-spacing: 0;
  white-space: nowrap;
}

.population-clear-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 6px;
}

.population-table-wrap {
  min-height: 360px;
}

.population-directory .dt-search {
  display: none;
}

.population-directory table.dataTable {
  width: 100% !important;
}

.population-directory table.dataTable th,
.population-directory table.dataTable td {
  vertical-align: middle;
}

.population-character-name {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  min-height: 22px;
}

.population-class-icon {
  display: inline-block;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  object-fit: cover;
}

.population-guild-name {
  display: inline-block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.population-last-seen {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.community-profile-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.community-profile-avatar {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(217, 181, 107, 0.42);
  background: rgba(11, 15, 20, 0.86);
  box-shadow: 0 0 0 3px rgba(11, 15, 20, 0.65);
}

.community-profile-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--amber-strong);
  font-size: 1.35rem;
}

.community-profile-guide-list {
  display: grid;
  gap: 0.7rem;
  padding: 0;
  list-style: none;
}

.community-profile-guide-list li {
  display: grid;
  gap: 0.15rem;
}

.community-profile-guide-list a {
  color: var(--text-strong);
  font-weight: 700;
  text-decoration: none;
}

.community-profile-guide-list a:hover {
  color: var(--amber-strong);
  text-decoration: none;
}

.community-guild-directory .table {
  margin-bottom: 0;
}

.community-guild-name {
  display: inline-block;
  max-width: min(42vw, 520px);
  overflow-wrap: anywhere;
  color: var(--text-strong);
  font-weight: 700;
}

.community-guild-name:hover {
  color: var(--amber-strong);
}

.community-guild-search {
  display: flex;
  gap: 0.5rem;
}

.community-guild-search .form-control {
  min-width: 0;
}

.community-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.feed-privacy-select {
  width: auto;
  min-width: 150px;
  max-width: min(260px, 42vw);
}

.population-chart-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(105px, 1fr));
  min-width: min(100%, 570px);
  border: 1px solid rgba(217, 181, 107, 0.22);
  border-radius: 8px;
  background: rgba(9, 13, 18, 0.52);
}

.population-chart-summary .population-stat + .population-stat {
  border-left: 1px solid rgba(217, 181, 107, 0.18);
}

.population-chart-panel {
  border-radius: 8px;
}

.population-chart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.population-chart-toolbar .btn-group {
  flex-wrap: wrap;
}

.population-chart-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 1.5rem;
  margin-bottom: 0.45rem;
  color: var(--muted-soft);
  font-size: 0.78rem;
}

.population-chart-wrap {
  position: relative;
  width: 100%;
  min-height: 480px;
}

@media (max-width: 1280px) {
  .population-header {
    align-items: stretch;
    flex-direction: column;
  }

  .population-header-side {
    align-items: stretch;
    width: 100%;
    margin-left: 0;
  }

  .population-realm-picker {
    width: 100%;
  }

  .population-stats,
  .population-chart-summary {
    width: 100%;
  }

  .population-filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .population-filter-action {
    align-self: end;
  }
}

@media (max-width: 760px) {
  .population-stats {
    grid-template-columns: 1fr;
  }

  .population-chart-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .population-stat + .population-stat {
    border-top: 1px solid rgba(217, 181, 107, 0.18);
    border-left: 0;
  }

  .population-chart-summary .population-stat + .population-stat {
    border-top: 0;
    border-left: 1px solid rgba(217, 181, 107, 0.18);
  }

  .population-chart-summary .population-stat:nth-child(3) {
    border-top: 1px solid rgba(217, 181, 107, 0.18);
    border-left: 0;
  }

  .population-chart-summary .population-stat:nth-child(4) {
    border-top: 1px solid rgba(217, 181, 107, 0.18);
  }

  .population-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .population-filter-action {
    justify-content: flex-end;
  }

  .population-chart-toolbar,
  .population-chart-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .population-chart-wrap {
    min-height: 390px;
  }
}

@media (max-width: 480px) {
  .population-filters {
    grid-template-columns: 1fr;
  }

  .population-filter-action {
    justify-content: flex-start;
  }

  .population-view-tabs,
  .population-view-tabs .btn,
  .population-chart-toolbar .btn-group {
    width: 100%;
  }

  .population-view-tabs .btn,
  .population-chart-toolbar .btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}

@media (max-width: 991px) {
  .announcement-editor-topbar {
    position: static;
    flex-direction: column;
  }

  .announcement-editor-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .announcement-editor-mobile-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .announcement-editor-grid {
    grid-template-columns: 1fr;
  }

  .announcement-editor-preview-panel {
    position: static;
  }

  .announcement-editor-panel.is-mobile-hidden,
  .announcement-editor-preview-panel.is-mobile-hidden {
    display: none;
  }
}

@media (max-width: 575px) {
  .announcement-detail-title {
    font-size: 1.55rem;
  }

  .announcement-editor-textarea {
    min-height: 24rem;
  }
}
