:root,
html[data-theme="aurora-noctis"] {
  --bg: #061018;
  --paper: rgba(10, 24, 37, 0.84);
  --paper-strong: rgba(12, 29, 44, 0.94);
  --paper-soft: rgba(12, 29, 44, 0.68);
  --paper-solid: #102739;
  --ink: #eef8ff;
  --muted: #95aec3;
  --accent: #69e0cf;
  --accent-dark: #2ca596;
  --accent-soft: rgba(105, 224, 207, 0.22);
  --line: rgba(163, 203, 229, 0.17);
  --line-strong: rgba(163, 203, 229, 0.3);
  --shadow: 0 24px 80px rgba(1, 9, 16, 0.42);
  --bg-glow-one: rgba(56, 191, 171, 0.28);
  --bg-glow-two: rgba(95, 130, 255, 0.24);
  --bg-gradient-start: #02070d;
  --bg-gradient-mid: #071623;
  --bg-gradient-end: #08111d;
  --ribbon-surface: rgba(6, 18, 28, 0.74);
  --nav-surface: rgba(7, 19, 30, 0.78);
  --hero-surface: rgba(9, 22, 34, 0.58);
  --footer-surface: rgba(6, 18, 28, 0.8);
  --dropdown-surface: rgba(7, 19, 30, 0.96);
  --input-bg: rgba(6, 20, 31, 0.92);
  --input-border: rgba(163, 203, 229, 0.22);
  --input-focus-ring: rgba(105, 224, 207, 0.16);
  --button-contrast: #051219;
  --button-secondary-hover: rgba(255, 255, 255, 0.06);
  --button-light-bg: rgba(255, 255, 255, 0.08);
  --button-light-hover: rgba(255, 255, 255, 0.16);
  --surface-quiet: rgba(255, 255, 255, 0.05);
  --table-button-text: #f2ffff;
  --toggler-filter: invert(1) grayscale(1) brightness(200%);
  --entry-surface-1: rgba(9, 31, 47, 0.92);
  --entry-surface-2: rgba(10, 39, 55, 0.92);
  --entry-surface-3: rgba(14, 34, 63, 0.92);
  --entry-surface-4: rgba(13, 44, 48, 0.92);
  color-scheme: dark;
}

html[data-theme="sunlit-parchment"] {
  --bg: #f6efe0;
  --paper: rgba(255, 251, 242, 0.88);
  --paper-strong: rgba(255, 252, 246, 0.96);
  --paper-soft: rgba(255, 250, 240, 0.72);
  --paper-solid: #fffaf0;
  --ink: #231c16;
  --muted: #71665b;
  --accent: #c76d3f;
  --accent-dark: #944622;
  --accent-soft: rgba(199, 109, 63, 0.2);
  --line: rgba(35, 28, 22, 0.12);
  --line-strong: rgba(35, 28, 22, 0.2);
  --shadow: 0 24px 80px rgba(67, 46, 23, 0.12);
  --bg-glow-one: rgba(244, 183, 110, 0.28);
  --bg-glow-two: rgba(255, 230, 173, 0.24);
  --bg-gradient-start: #fbf4e8;
  --bg-gradient-mid: #f6efe0;
  --bg-gradient-end: #efe2cf;
  --ribbon-surface: rgba(255, 251, 244, 0.72);
  --nav-surface: rgba(255, 252, 246, 0.82);
  --hero-surface: rgba(255, 250, 241, 0.58);
  --footer-surface: rgba(255, 251, 243, 0.76);
  --dropdown-surface: rgba(255, 252, 246, 0.98);
  --input-bg: rgba(255, 255, 255, 0.82);
  --input-border: rgba(35, 28, 22, 0.14);
  --input-focus-ring: rgba(199, 109, 63, 0.14);
  --button-contrast: #fffaf2;
  --button-secondary-hover: rgba(35, 28, 22, 0.06);
  --button-light-bg: rgba(255, 255, 255, 0.9);
  --button-light-hover: rgba(255, 255, 255, 1);
  --surface-quiet: rgba(255, 255, 255, 0.62);
  --table-button-text: #fffdf8;
  --toggler-filter: none;
  --entry-surface-1: rgba(255, 247, 232, 0.96);
  --entry-surface-2: rgba(255, 240, 222, 0.96);
  --entry-surface-3: rgba(255, 244, 229, 0.96);
  --entry-surface-4: rgba(250, 235, 215, 0.96);
  color-scheme: light;
}

html[data-theme="ember-citadel"] {
  --bg: #130b0f;
  --paper: rgba(34, 18, 26, 0.84);
  --paper-strong: rgba(46, 22, 32, 0.94);
  --paper-soft: rgba(46, 22, 32, 0.68);
  --paper-solid: #301922;
  --ink: #fff1ed;
  --muted: #cfaaa3;
  --accent: #ff8a5b;
  --accent-dark: #d85a2b;
  --accent-soft: rgba(255, 138, 91, 0.2);
  --line: rgba(255, 215, 204, 0.16);
  --line-strong: rgba(255, 215, 204, 0.28);
  --shadow: 0 24px 80px rgba(16, 6, 10, 0.48);
  --bg-glow-one: rgba(255, 126, 83, 0.24);
  --bg-glow-two: rgba(189, 53, 72, 0.2);
  --bg-gradient-start: #090408;
  --bg-gradient-mid: #1a0d14;
  --bg-gradient-end: #120a10;
  --ribbon-surface: rgba(28, 14, 20, 0.74);
  --nav-surface: rgba(31, 14, 22, 0.8);
  --hero-surface: rgba(37, 17, 27, 0.6);
  --footer-surface: rgba(27, 13, 20, 0.82);
  --dropdown-surface: rgba(29, 13, 21, 0.96);
  --input-bg: rgba(30, 14, 21, 0.92);
  --input-border: rgba(255, 215, 204, 0.18);
  --input-focus-ring: rgba(255, 138, 91, 0.16);
  --button-contrast: #220d12;
  --button-secondary-hover: rgba(255, 255, 255, 0.06);
  --button-light-bg: rgba(255, 255, 255, 0.08);
  --button-light-hover: rgba(255, 255, 255, 0.16);
  --surface-quiet: rgba(255, 255, 255, 0.05);
  --table-button-text: #fff3ed;
  --toggler-filter: invert(1) grayscale(1) brightness(200%);
  --entry-surface-1: rgba(53, 22, 29, 0.92);
  --entry-surface-2: rgba(64, 24, 30, 0.92);
  --entry-surface-3: rgba(60, 31, 24, 0.92);
  --entry-surface-4: rgba(73, 30, 39, 0.92);
  color-scheme: dark;
}

html[data-theme="glacier-bloom"] {
  --bg: #eaf6f7;
  --paper: rgba(248, 253, 255, 0.86);
  --paper-strong: rgba(252, 254, 255, 0.96);
  --paper-soft: rgba(245, 252, 253, 0.76);
  --paper-solid: #f8fdff;
  --ink: #10212b;
  --muted: #5f7887;
  --accent: #2c97a5;
  --accent-dark: #1f6d7c;
  --accent-soft: rgba(44, 151, 165, 0.18);
  --line: rgba(16, 33, 43, 0.12);
  --line-strong: rgba(16, 33, 43, 0.2);
  --shadow: 0 24px 80px rgba(20, 56, 71, 0.12);
  --bg-glow-one: rgba(132, 230, 227, 0.22);
  --bg-glow-two: rgba(202, 230, 255, 0.26);
  --bg-gradient-start: #f6fdff;
  --bg-gradient-mid: #eaf6f7;
  --bg-gradient-end: #d9edf1;
  --ribbon-surface: rgba(248, 252, 255, 0.72);
  --nav-surface: rgba(248, 253, 255, 0.84);
  --hero-surface: rgba(245, 252, 253, 0.6);
  --footer-surface: rgba(246, 251, 253, 0.78);
  --dropdown-surface: rgba(252, 254, 255, 0.98);
  --input-bg: rgba(255, 255, 255, 0.84);
  --input-border: rgba(16, 33, 43, 0.14);
  --input-focus-ring: rgba(44, 151, 165, 0.15);
  --button-contrast: #f3fcff;
  --button-secondary-hover: rgba(16, 33, 43, 0.06);
  --button-light-bg: rgba(255, 255, 255, 0.86);
  --button-light-hover: rgba(255, 255, 255, 1);
  --surface-quiet: rgba(255, 255, 255, 0.66);
  --table-button-text: #f4fdff;
  --toggler-filter: none;
  --entry-surface-1: rgba(240, 251, 255, 0.98);
  --entry-surface-2: rgba(232, 247, 250, 0.98);
  --entry-surface-3: rgba(236, 245, 255, 0.98);
  --entry-surface-4: rgba(229, 243, 246, 0.98);
  color-scheme: light;
}

html[data-theme="dark-rainbow"] {
  --bg: #090812;
  --paper: rgba(16, 14, 30, 0.84);
  --paper-strong: rgba(24, 20, 40, 0.94);
  --paper-soft: rgba(22, 18, 37, 0.72);
  --paper-solid: #17152c;
  --ink: #f5f2ff;
  --muted: #bdb4de;
  --accent: #8df7ff;
  --accent-dark: #66d1ff;
  --accent-soft: rgba(141, 247, 255, 0.18);
  --line: rgba(220, 214, 255, 0.16);
  --line-strong: rgba(220, 214, 255, 0.28);
  --shadow: 0 24px 90px rgba(8, 5, 20, 0.5);
  --bg-glow-one: rgba(255, 78, 205, 0.24);
  --bg-glow-two: rgba(53, 208, 255, 0.24);
  --bg-gradient-start: #05030b;
  --bg-gradient-mid: #120d24;
  --bg-gradient-end: #0c0a18;
  --ribbon-surface: rgba(13, 11, 27, 0.74);
  --nav-surface: rgba(15, 13, 30, 0.8);
  --hero-surface: rgba(20, 17, 37, 0.58);
  --footer-surface: rgba(12, 10, 25, 0.8);
  --dropdown-surface: rgba(15, 13, 30, 0.96);
  --input-bg: rgba(14, 12, 27, 0.94);
  --input-border: rgba(220, 214, 255, 0.18);
  --input-focus-ring: rgba(141, 247, 255, 0.18);
  --button-contrast: #120d21;
  --button-secondary-hover: rgba(255, 255, 255, 0.08);
  --button-light-bg: rgba(255, 255, 255, 0.08);
  --button-light-hover: rgba(255, 255, 255, 0.16);
  --surface-quiet: rgba(255, 255, 255, 0.05);
  --table-button-text: #faf6ff;
  --toggler-filter: invert(1) grayscale(1) brightness(200%);
  --entry-surface-red: rgba(78, 22, 31, 0.92);
  --entry-surface-orange: rgba(84, 40, 18, 0.92);
  --entry-surface-yellow: rgba(83, 68, 19, 0.92);
  --entry-surface-green: rgba(22, 69, 39, 0.92);
  --entry-surface-blue: rgba(19, 46, 88, 0.92);
  --entry-surface-indigo: rgba(43, 27, 93, 0.92);
  --entry-surface-violet: rgba(72, 24, 92, 0.92);
  color-scheme: dark;
}

html[data-theme="light-rainbow"] {
  --bg: #fef6fb;
  --paper: rgba(255, 252, 255, 0.88);
  --paper-strong: rgba(255, 255, 255, 0.96);
  --paper-soft: rgba(255, 251, 254, 0.76);
  --paper-solid: #fffaff;
  --ink: #25192a;
  --muted: #7a627f;
  --accent: #ff5bbd;
  --accent-dark: #db3da0;
  --accent-soft: rgba(255, 91, 189, 0.16);
  --line: rgba(37, 25, 42, 0.12);
  --line-strong: rgba(37, 25, 42, 0.2);
  --shadow: 0 24px 90px rgba(97, 62, 117, 0.14);
  --bg-glow-one: rgba(255, 126, 185, 0.22);
  --bg-glow-two: rgba(123, 214, 255, 0.24);
  --bg-gradient-start: #fffaff;
  --bg-gradient-mid: #fef6fb;
  --bg-gradient-end: #eef6ff;
  --ribbon-surface: rgba(255, 249, 254, 0.76);
  --nav-surface: rgba(255, 252, 255, 0.84);
  --hero-surface: rgba(255, 248, 253, 0.6);
  --footer-surface: rgba(255, 250, 254, 0.78);
  --dropdown-surface: rgba(255, 255, 255, 0.98);
  --input-bg: rgba(255, 255, 255, 0.9);
  --input-border: rgba(37, 25, 42, 0.12);
  --input-focus-ring: rgba(255, 91, 189, 0.14);
  --button-contrast: #fff7fd;
  --button-secondary-hover: rgba(37, 25, 42, 0.06);
  --button-light-bg: rgba(255, 255, 255, 0.92);
  --button-light-hover: rgba(255, 255, 255, 1);
  --surface-quiet: rgba(255, 255, 255, 0.68);
  --table-button-text: #fffaff;
  --toggler-filter: none;
  --entry-surface-red: rgba(255, 234, 238, 0.98);
  --entry-surface-orange: rgba(255, 240, 225, 0.98);
  --entry-surface-yellow: rgba(255, 249, 214, 0.98);
  --entry-surface-green: rgba(235, 251, 231, 0.98);
  --entry-surface-blue: rgba(230, 243, 255, 0.98);
  --entry-surface-indigo: rgba(237, 233, 255, 0.98);
  --entry-surface-violet: rgba(247, 233, 255, 0.98);
  color-scheme: light;
}

body {
  background:
    radial-gradient(circle at top left, var(--bg-glow-one), transparent 35%),
    radial-gradient(circle at top right, var(--bg-glow-two), transparent 32%),
    linear-gradient(180deg, var(--bg-gradient-start) 0%, var(--bg-gradient-mid) 48%, var(--bg-gradient-end) 100%);
  color: var(--ink);
  font-family: 'Playfair Display', serif;
  min-height: 100vh;
  transition: background-color 0.25s ease, color 0.25s ease;
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--ink);
  --bs-border-color: var(--line);
  --bs-secondary-color: var(--muted);
}

::selection {
  background: var(--accent-soft);
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand-mark,
.hero-title {
  font-family: 'Playfair Display', serif;
}

.site-shell {
  min-height: 55vh;
  position: relative;
  z-index: 1;
}

.cookie-consent {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 1250;
  display: grid;
  gap: 1rem;
  max-width: 34rem;
  margin-left: auto;
  padding: 1.1rem 1.2rem;
  background: var(--paper-strong);
  border: 1px solid var(--line-strong);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.cookie-consent__eyebrow {
  margin: 0;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-dark);
}

.cookie-consent__text {
  color: var(--ink);
  line-height: 1.6;
}

.cookie-consent__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cookie-consent .btn-outline-secondary {
  color: var(--ink);
  border-color: var(--input-border);
}

.cookie-consent .btn-outline-secondary:hover,
.cookie-consent .btn-outline-secondary:focus {
  background: var(--button-secondary-hover);
  color: var(--ink);
  border-color: var(--line-strong);
}

.cookie-consent .btn-dark {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--button-contrast);
}

.cookie-consent .btn-dark:hover,
.cookie-consent .btn-dark:focus {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--button-contrast);
}

.site-header,
.site-footer,
.page-hero,
.login-card,
.cms-page-canvas > .cms-block,
.floating-toolbar,
.admin-panel .card,
.modal-content {
  backdrop-filter: blur(14px);
}

.site-header {
  position: relative;
  z-index: 1100;
}

.site-header .navbar,
.site-header .navbar-collapse,
.site-header .dropdown,
.site-header .dropdown-menu {
  position: relative;
}

.site-header .navbar {
  background: var(--nav-surface) !important;
  --bs-navbar-color: var(--muted);
  --bs-navbar-hover-color: var(--ink);
  --bs-navbar-active-color: var(--ink);
  --bs-navbar-brand-color: var(--ink);
  --bs-navbar-brand-hover-color: var(--ink);
  --bs-navbar-toggler-border-color: var(--line);
}

.site-header .navbar-toggler-icon,
.btn-close {
  filter: var(--toggler-filter);
}

.site-header .dropdown-menu {
  z-index: 1200;
  background: var(--dropdown-surface);
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.site-header .dropdown-item {
  border-radius: 0.75rem;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.site-header .dropdown-item:hover,
.site-header .dropdown-item:focus,
.site-header .dropdown-item:active {
  background-color: var(--accent);
  color: var(--button-contrast);
}

.top-ribbon {
  background: var(--ribbon-surface);
}

.brand-mark {
  font-size: 1.6rem;
  letter-spacing: 0.02em;
}

.eyebrow {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--accent-dark);
}

.text-secondary,
.text-body-secondary {
  color: var(--muted) !important;
}

.theme-switcher {
  display: grid;
  gap: 0.25rem;
  min-width: 11rem;
}

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

.theme-select {
  background-color: var(--input-bg);
  border-color: var(--input-border);
  color: var(--ink);
}

.theme-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.25rem var(--input-focus-ring);
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 4.25rem);
}

.page-hero {
  background: var(--hero-surface);
}
.py-5 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}
.cms-page-canvas {
  position: relative;
  display: grid;
  gap: 1.5rem;
}

.page-renderer-shell {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1.75rem;
  box-shadow: var(--shadow);
  padding: 1.5rem;
  backdrop-filter: blur(14px);
}

.page-editor-shell {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1.75rem;
  box-shadow: var(--shadow);
  padding: 1.5rem;
  backdrop-filter: blur(14px);
}

.page-editor-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
  position: sticky;
  top: 1rem;
  z-index: 20;
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
  padding: 1rem 1.25rem;
  backdrop-filter: blur(14px);
}

.page-editor-actions {
  justify-content: flex-start;
}

.page-editor-status {
  min-height: 1.25rem;
  margin-left: auto;
  text-align: right;
}

.page-editor-host {
  position: relative;
  padding: 0;
}

@media (min-width: 992px) {
  .page-editor-toolbar {
    align-items: flex-start;
    flex-direction: row;
    justify-content: space-between;
  }

  .cookie-consent {
    left: auto;
  }

  .page-editor-status {
    max-width: 24rem;
  }
}

.page-renderer-shell .codex-editor,
.page-renderer-shell .codex-editor__redactor,
.page-renderer-shell .ce-block,
.page-renderer-shell .ce-toolbar__content,
.page-renderer-shell .ce-block__content,
.page-editor-host .codex-editor,
.page-editor-host .codex-editor__redactor,
.page-editor-host .ce-block,
.page-editor-host .ce-toolbar__content,
.page-editor-host .ce-block__content {
  max-width: 100%;
}

.page-renderer-shell .ce-block__content,
.page-renderer-shell .ce-toolbar__content,
.page-editor-host .ce-block__content,
.page-editor-host .ce-toolbar__content {
  color: var(--ink);
}

.page-renderer-shell .ce-paragraph,
.page-renderer-shell .ce-header,
.page-renderer-shell .tc-table__inp,
.page-editor-host .ce-paragraph,
.page-editor-host .ce-header,
.page-editor-host .tc-table__inp {
  color: var(--ink);
}

.page-renderer-shell .codex-editor__redactor,
.page-editor-host .codex-editor__redactor {
  padding-bottom: 0 !important;
}

.page-renderer-shell .ce-block__content,
.page-editor-host .ce-block__content {
  padding-left: 0;
  padding-right: 0;
}

.page-editor-host .ce-paragraph[data-placeholder]:empty::before,
.page-editor-host .ce-header[data-placeholder]:empty::before {
  color: var(--muted);
}

.page-editor-host .ce-toolbar__actions {
  left: -4rem;
  right: auto;
}

.page-editor-host .ce-toolbar__plus,
.page-editor-host .ce-toolbar__settings-btn {
  left: 0;
  right: auto;
}

.page-editor-host .ce-toolbar__plus,
.page-editor-host .ce-toolbar__settings-btn,
.page-editor-host .ce-inline-toolbar__dropdown,
.page-editor-host .ce-conversion-toolbar,
.page-editor-host .ce-popover,
.page-editor-host .tc-popover {
  color: var(--ink);
}

.page-editor-host .ce-toolbar__plus,
.page-editor-host .ce-toolbar__settings-btn,
.page-editor-host .ce-inline-toolbar,
.page-editor-host .ce-conversion-toolbar,
.page-editor-host .ce-popover__container,
.page-editor-host .ce-popover,
.page-editor-host .tc-popover,
.page-editor-host .tc-popover__item {
  background: var(--paper-strong);
  border-color: var(--line);
}

.page-editor-host .ce-popover__container {
  color: var(--ink);
}

.page-editor-host .ce-popover-item,
.page-editor-host .ce-popover-item__icon,
.page-editor-host .ce-inline-tool,
.page-editor-host .tc-popover__item-icon {
  color: inherit;
}

.page-editor-host .ce-inline-tool-input {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 0.85rem;
  color: var(--ink);
}

.page-editor-host .ce-inline-tool-input::placeholder {
  color: var(--muted);
}

.page-editor-host .ce-inline-tool-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.25rem var(--input-focus-ring);
  outline: none;
}

.page-editor-host .ce-popover-item:hover,
.page-editor-host .ce-inline-tool:hover,
.page-editor-host .ce-toolbar__plus:hover,
.page-editor-host .ce-toolbar__settings-btn:hover,
.page-editor-host .tc-popover__item:hover {
  background: var(--button-secondary-hover);
}

.page-editor-host .ce-inline-tool.ce-inline-tool--link {
  position: relative;
  font-size: 0;
}

.page-editor-host .ce-inline-tool.ce-inline-tool--link svg {
  display: none;
}

.page-editor-host .ce-inline-tool.ce-inline-tool--link::before {
  content: "A";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 0.95rem;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
  color: currentColor;
}

.page-editor-host .ce-inline-toolbar,
.page-editor-host .ce-conversion-toolbar,
.page-editor-host .ce-popover,
.page-editor-host .tc-popover {
  box-shadow: var(--shadow);
}

.page-editor-host .tc-table,
.page-editor-host .tc-table__wrap,
.page-editor-host .tc-table__inp {
  border-color: var(--line);
}

.page-editor-host .tc-table__inp {
  background: var(--input-bg);
}

.page-renderer-shell .tc-table,
.page-renderer-shell .tc-table__wrap,
.page-renderer-shell .tc-table__inp {
  border-color: var(--line);
}

.page-renderer-shell .ce-tune-alignment--left,
.page-editor-host .ce-tune-alignment--left {
  text-align: left;
}

.page-renderer-shell .ce-tune-alignment--center,
.page-editor-host .ce-tune-alignment--center {
  text-align: center;
}

.page-renderer-shell .ce-tune-alignment--right,
.page-editor-host .ce-tune-alignment--right {
  text-align: right;
}

.page-renderer-shell .cdx-text-variant--call-out .ce-block__content,
.page-editor-host .cdx-text-variant--call-out .ce-block__content {
  background: var(--paper-solid);
  border: 1px solid var(--accent);
  border-radius: 1rem;
  box-shadow: 0 0 0 0.3rem var(--accent-soft);
  padding: 1rem 1.25rem;
  margin: 0.75rem 0;
}

.page-renderer-shell .cdx-text-variant--citation .ce-block__content,
.page-editor-host .cdx-text-variant--citation .ce-block__content {
  color: var(--muted);
  font-style: italic;
}

.page-renderer-shell .cdx-text-variant--details .ce-block__content,
.page-editor-host .cdx-text-variant--details .ce-block__content {
  color: var(--muted);
  font-size: 0.92rem;
}

.page-renderer-shell .ce-editorjsColumns_wrapper,
.page-editor-host .ce-editorjsColumns_wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1rem 0;
}

.page-renderer-shell .ce-editorjsColumns_col,
.page-editor-host .ce-editorjsColumns_col {
  flex: 1 1 0;
  min-width: 0;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.85rem;
}

@media (min-width: 768px) {
  .page-renderer-shell .ce-editorjsColumns_wrapper,
  .page-editor-host .ce-editorjsColumns_wrapper {
    flex-direction: row;
    align-items: stretch;
  }
}

.page-editor-host .ce-editorjsColumns_wrapper .ce-toolbar__actions {
  background: var(--surface-quiet);
  border: 1px solid var(--line);
}

.page-renderer-shell .accordion-wrapper,
.page-editor-host .accordion-wrapper {
  color: var(--ink);
}

.page-renderer-shell .settings-popover,
.page-editor-host .settings-popover {
  background: var(--paper-strong);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.page-renderer-shell .settings-block-config > input[type=number],
.page-editor-host .settings-block-config > input[type=number],
.page-renderer-shell .settings-checkbox,
.page-editor-host .settings-checkbox {
  background: var(--input-bg);
  border-color: var(--input-border);
  color: var(--ink);
}

.page-renderer-shell .save-settings,
.page-editor-host .save-settings {
  background: var(--accent);
  color: var(--button-contrast);
}

.page-renderer-shell .save-settings:hover,
.page-editor-host .save-settings:hover {
  background: var(--accent-dark);
}

.page-editor-host .ce-block--drop-target .ce-block__content::before {
  border-color: var(--accent);
}

.page-renderer-shell .ce-popover,
.page-renderer-shell .ce-inline-toolbar,
.page-renderer-shell .ce-conversion-toolbar {
  background: var(--paper-strong);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.editor-image-tool {
  background: var(--paper-solid);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem;
}

.cms-block {
  position: relative;
  isolation: isolate;
   background: transparent;
  border: 1px solid transparent;
  border-radius: 1.5rem;
  padding: 0;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.cms-nested-block + .cms-nested-block {
  margin-top: 1rem;
}

.cms-accordion-view {
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
}

.cms-accordion-view summary {
  cursor: pointer;
  list-style: none;
}

.cms-accordion-view summary::-webkit-details-marker {
  display: none;
}

.cms-block-actions {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
  z-index: 1050;
}

.admin-only {
  display: none;
}

body.admin-mode .admin-only {
  display: flex;
}

body.admin-mode .admin-panel.admin-only {
  display: block;
}

body:not(.admin-mode) .nav-admin-controls,
body:not(.admin-mode) .dropdown-menu .nav-edit-button.admin-only {
  display: none !important;
}

body.admin-mode .dropdown-menu .nav-edit-button.admin-only {
  display: inline-flex;
}

body:not(.admin-mode) .cms-block-actions {
  display: none;
}

.floating-toolbar {
  position: fixed;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.6rem;
  z-index: 1000;
}

.floating-toolbar .form-select {
  width: auto;
  min-width: 5rem;
}

.scroll-top-button {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 3.25rem;
  height: 3.25rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper-strong);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  z-index: 1040;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.scroll-top-button:hover,
.scroll-top-button:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--button-contrast);
  transform: translateY(-2px);
}

.scroll-top-button:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 0.3rem var(--accent-soft), var(--shadow);
}

.scroll-top-button i {
  font-size: 1.1rem;
  line-height: 1;
}

.cms-richtext p:last-child {
  margin-bottom: 0;
}

hr.my-4 {
  position: relative;
  width: min(66rem, 100%);
  height: 1px;
  margin: 2.5rem auto !important;
  border: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--line) 18%,
    var(--accent) 50%,
    var(--line) 82%,
    transparent 100%
  );
  overflow: visible;
}

hr.my-4::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.7rem;
  height: 0.7rem;
  border: 1px solid var(--line-strong);
  background: var(--paper-solid);
  box-shadow: 0 0 0 0.2rem var(--paper-solid);
  transform: translate(-50%, -50%) rotate(45deg);
}

.cms-image-figure img {
  max-height: 30rem;
  object-fit: cover;
}

.cms-table td {
  min-width: 7rem;
}

.table-add-row,
.table-add-column {
  position: absolute;
  border: none;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--table-button-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.table-add-row {
  bottom: -0.8rem;
  left: 50%;
  transform: translateX(-50%);
}

.table-add-column {
  top: 50%;
  right: -0.8rem;
  transform: translateY(-50%);
}

.rich-editor-shell {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--paper-solid);
  overflow: hidden;
}

.rich-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.rich-editor {
  min-height: 10rem;
  padding: 1rem;
  outline: none;
}

.footer-link {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.footer-link:hover {
  color: var(--accent-dark);
}

.site-footer {
  background: var(--footer-surface);
  border-top: 1px solid var(--line);
}

.login-card,
.modal-content,
.admin-panel .card {
  background: var(--paper-strong);
}

.empty-state {
  background: var(--surface-quiet);
}

.cache-search-shell {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.cache-search-input {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 1rem;
}

.cache-filter-select,
.cache-sort-select {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 1rem;
  color: var(--ink);
}

.cache-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.25rem var(--input-focus-ring);
}

.cache-filter-select:focus,
.cache-sort-select:focus,
.cache-sort-order-button:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.25rem var(--input-focus-ring);
}

.cache-sort-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: stretch;
}

.cache-sort-order-button {
  min-width: 3.75rem;
  border: 1px solid var(--input-border);
  border-radius: 1rem;
  background: var(--input-bg);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  padding: 0 1rem;
}

.cache-sort-order-button:hover {
  background: var(--button-secondary-hover);
}

.npc-list,
.cache-list {
  display: grid;
  gap: 1rem;
}

.npc-card,
.cache-card {
  position: relative;
  isolation: isolate;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.readonly-collection-page .cache-card:nth-child(4n + 1) {
  background: var(--entry-surface-1);
}

.readonly-collection-page .cache-card:nth-child(4n + 2) {
  background: var(--entry-surface-2);
}

.readonly-collection-page .cache-card:nth-child(4n + 3) {
  background: var(--entry-surface-3);
}

.readonly-collection-page .cache-card:nth-child(4n) {
  background: var(--entry-surface-4);
}

html[data-theme="dark-rainbow"] .readonly-collection-page .cache-card:nth-child(7n + 1),
html[data-theme="light-rainbow"] .readonly-collection-page .cache-card:nth-child(7n + 1) {
  background: var(--entry-surface-red);
}

html[data-theme="dark-rainbow"] .readonly-collection-page .cache-card:nth-child(7n + 2),
html[data-theme="light-rainbow"] .readonly-collection-page .cache-card:nth-child(7n + 2) {
  background: var(--entry-surface-orange);
}

html[data-theme="dark-rainbow"] .readonly-collection-page .cache-card:nth-child(7n + 3),
html[data-theme="light-rainbow"] .readonly-collection-page .cache-card:nth-child(7n + 3) {
  background: var(--entry-surface-yellow);
}

html[data-theme="dark-rainbow"] .readonly-collection-page .cache-card:nth-child(7n + 4),
html[data-theme="light-rainbow"] .readonly-collection-page .cache-card:nth-child(7n + 4) {
  background: var(--entry-surface-green);
}

html[data-theme="dark-rainbow"] .readonly-collection-page .cache-card:nth-child(7n + 5),
html[data-theme="light-rainbow"] .readonly-collection-page .cache-card:nth-child(7n + 5) {
  background: var(--entry-surface-blue);
}

html[data-theme="dark-rainbow"] .readonly-collection-page .cache-card:nth-child(7n + 6),
html[data-theme="light-rainbow"] .readonly-collection-page .cache-card:nth-child(7n + 6) {
  background: var(--entry-surface-indigo);
}

html[data-theme="dark-rainbow"] .readonly-collection-page .cache-card:nth-child(7n),
html[data-theme="light-rainbow"] .readonly-collection-page .cache-card:nth-child(7n) {
  background: var(--entry-surface-violet);
}

.npc-summary,
.cache-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.4rem 1.5rem;
  cursor: pointer;
  list-style: none;
}

.cache-summary-leading {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.cache-toggle-arrow {
  width: 0.9rem;
  height: 0.9rem;
  flex: 0 0 auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transform-origin: 55% 55%;
  transition: transform 0.18s ease;
  opacity: 0.78;
}

.npc-summary::-webkit-details-marker,
.cache-summary::-webkit-details-marker {
  display: none;
}

.npc-summary-name,
.cache-summary-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
}

.npc-summary-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.npc-card[open] .npc-summary,
.cache-card[open] .cache-summary {
  border-bottom: 1px solid var(--line);
}

.cache-card[open] .cache-toggle-arrow {
  transform: rotate(45deg);
}

.readonly-collection-page .cache-card {
  scroll-margin-top: 7rem;
}

.npc-card-body,
.cache-card-body {
  padding: 1.5rem;
}

.npc-section-card,
.cache-section-card {
  position: relative;
  isolation: isolate;
  height: 100%;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  padding: 1.25rem;
}

.npc-data-list,
.cache-data-list {
  display: grid;
  gap: 1rem;
}

.npc-data-list div,
.cache-data-list div {
  display: grid;
  gap: 0.2rem;
}

.npc-data-list dt,
.cache-data-list dt,
.npc-detail-label,
.cache-detail-label,
.npc-stat-label,
.cache-stat-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.npc-data-list dd,
.cache-data-list dd {
  margin: 0;
}

.npc-stat-grid,
.cache-stat-grid,
.npc-detail-grid,
.cache-detail-grid,
.npc-chip-list,
.cache-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.npc-stat-pill,
.cache-stat-pill,
.npc-detail-item,
.cache-detail-item,
.npc-chip,
.cache-chip {
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 1rem;
}

.form-control,
.form-select,
.form-check-input {
  background-color: var(--input-bg);
  border-color: var(--input-border);
  color: var(--ink);
}

.form-control::placeholder {
  color: var(--muted);
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  background-color: var(--input-bg);
  border-color: var(--accent);
  box-shadow: 0 0 0 0.25rem var(--input-focus-ring);
  color: var(--ink);
}

.form-check-input:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

.btn-dark {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--button-contrast);
}

.btn-dark:hover,
.btn-dark:focus,
.btn-dark:active,
.btn-dark.active,
.btn-check:checked + .btn-outline-dark {
  background-color: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--button-contrast);
}

.btn-outline-dark {
  color: var(--ink);
  border-color: var(--input-border);
}

.btn-outline-dark:hover,
.btn-outline-dark:focus,
.btn-outline-dark:active,
.btn-outline-dark.active {
  background-color: var(--button-secondary-hover);
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-outline-secondary {
  color: var(--muted);
  border-color: var(--input-border);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active,
.btn-outline-secondary.active {
  background-color: var(--button-secondary-hover);
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-light {
  background-color: var(--button-light-bg);
  border-color: var(--input-border);
  color: var(--ink);
}

.btn-light:hover,
.btn-light:focus,
.btn-light:active,
.btn-light.active {
  background-color: var(--button-light-hover);
  border-color: var(--line-strong);
  color: var(--ink);
}

.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--ink);
  --bs-table-border-color: var(--line);
}

.modal-header,
.modal-footer,
.dropdown-divider,
.border,
.border-top,
.border-bottom {
  border-color: var(--line) !important;
}

.npc-stat-pill,
.cache-stat-pill {
  min-width: 7rem;
  padding: 0.8rem 0.9rem;
  display: grid;
  gap: 0.2rem;
}

.npc-chip,
.cache-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.7rem;
}

.cache-chip-link {
  color: var(--ink);
  text-decoration: none;
}

.cache-chip-link:hover,
.cache-chip-link:focus {
  color: var(--ink);
  border-color: var(--line-strong);
  text-decoration: none;
}

.npc-detail-grid,
.cache-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.npc-detail-item,
.cache-detail-item {
  padding: 0.95rem 1rem;
}

.npc-detail-value,
.cache-detail-value {
  margin-top: 0.35rem;
  word-break: break-word;
}

.cache-description {
  white-space: pre-line;
}

.border-dashed {
  border-style: dashed !important;
}

@media (max-width: 991.98px) {
  .cms-block {
    padding: 1.2rem;
  }

  .floating-toolbar {
    max-width: calc(100vw - 2rem);
    overflow-x: auto;
  }

  .scroll-top-button {
    display: none !important;
  }

  .nav-admin-controls {
    margin-bottom: 0.5rem;
  }

  .npc-summary,
  .cache-summary {
    flex-direction: column;
    align-items: flex-start;
  }

  .cache-summary-leading {
    width: 100%;
  }

  .npc-summary-meta {
    justify-content: flex-start;
  }
}