:root {
  --page-bg: #b8b8b8;
  --page-bg-image: none;
  --page-bg-position: center top;
  --page-bg-size: auto;
  --page-bg-repeat: repeat;
  --page-bg-attachment: scroll;
  --page-text: #111111;
  --page-muted: #4b4b4b;
  --heading-color: #111111;
  --panel-bg: #fffdf8;
  --panel-bg-image: none;
  --panel-bg-position: center top;
  --panel-bg-size: auto;
  --panel-bg-repeat: repeat;
  --panel-border: #111111;
  --panel-shadow-color: #474747;
  --panel-rule: #7f7f7f;
  --surface-muted: #ece7dc;
  --surface-accent: #d9d3c5;
  --list-bg: #f6f2ea;
  --input-bg: #ffffff;
  --input-border: #111111;
  --button-bg: #d1ccc0;
  --button-hover: #e0d9ca;
  --button-text: #111111;
  --link-color: #0038c2;
  --link-hover: #b53528;
  --nav-bg: #4c5563;
  --nav-border: #111111;
  --admin-nav-bg: #355046;
  --nav-title: #ffbf52;
  --nav-title-hover: #fff4a4;
  --nav-item-bg: #7a211e;
  --nav-item-border: #ffffff;
  --nav-item-text: #ffffff;
  --nav-item-hover-bg: #fff07a;
  --nav-item-hover-text: #111111;
  --code-bg: #e3ddd0;
  --blockquote-border: #111111;
  --success-bg: #e3f6e8;
  --success-border: #17733a;
  --error-bg: #ffe7e5;
  --error-border: #9a2e2e;
}

html[data-theme="dark"] {
  --page-bg: #12161c;
  --page-text: #ede7dc;
  --page-muted: #b6aea1;
  --heading-color: #f5efe4;
  --panel-bg: #1d232b;
  --panel-border: #7d8796;
  --panel-shadow-color: #000000;
  --panel-rule: #546070;
  --surface-muted: #252c35;
  --surface-accent: #39424e;
  --list-bg: #252d37;
  --input-bg: #171c23;
  --input-border: #7d8796;
  --button-bg: #424b58;
  --button-hover: #586373;
  --button-text: #f5efe4;
  --link-color: #97b9ff;
  --link-hover: #ffb08f;
  --nav-bg: #24313d;
  --nav-border: #8f9bab;
  --admin-nav-bg: #1f473c;
  --nav-title: #ffb86b;
  --nav-title-hover: #fff0a5;
  --nav-item-bg: #4d3960;
  --nav-item-border: #c7d0dc;
  --nav-item-text: #f6f1e8;
  --nav-item-hover-bg: #f2d269;
  --nav-item-hover-text: #151515;
  --code-bg: #11161d;
  --blockquote-border: #c5cdd8;
  --success-bg: #1f3c2d;
  --success-border: #71d199;
  --error-bg: #442428;
  --error-border: #f09d9d;
}

html {
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Times New Roman", serif;
  background-color: var(--page-bg);
  background-image: var(--page-bg-image);
  background-position: var(--page-bg-position);
  background-size: var(--page-bg-size);
  background-repeat: var(--page-bg-repeat);
  background-attachment: var(--page-bg-attachment);
  color: var(--page-text);
  margin: 0;
  padding: 0 0 40px;
  line-height: 1.6;
}

body[data-section="admin"] {
  --page-bg-image: none;
  --panel-bg-image: none;
  --admin-shell-bg: var(--input-bg);
  --admin-panel-bg: var(--page-bg);
  --admin-card-bg: var(--input-bg);
  --admin-control-bg: var(--input-bg);
  --admin-control-border: var(--input-border);
  --admin-button-bg: var(--input-bg);
  --admin-button-hover-bg: var(--page-bg);
  --admin-button-text: var(--page-text);
  font-family: Tahoma, Verdana, "Segoe UI", sans-serif;
  line-height: 1.45;
  background-color: var(--page-bg);
  background-image: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select {
  width: 100%;
  max-width: 100%;
  color: var(--page-text);
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  padding: 8px;
}

button {
  color: var(--button-text);
  background-color: var(--button-bg);
  border: 2px outset var(--button-bg);
  padding: 10px 12px;
  cursor: pointer;
}

button:hover {
  background-color: var(--button-hover);
}

.navbar {
  --effective-nav-bg: var(--site-nav-bg-override, var(--nav-bg));
  --effective-nav-bg-image: var(--site-nav-bg-image-override, none);
  --effective-nav-bg-repeat: var(--site-nav-bg-repeat-override, repeat);
  --effective-nav-bg-size: var(--site-nav-bg-size-override, auto);
  --effective-nav-bg-position: var(--site-nav-bg-position-override, center top);
  --effective-nav-bg-attachment: var(--site-nav-bg-attachment-override, scroll);
  --effective-nav-title: var(--site-nav-title-override, var(--nav-title));
  --effective-nav-title-hover: var(--site-nav-title-hover-override, var(--nav-title-hover));
  --effective-nav-item-bg: var(--site-nav-item-bg-override, var(--nav-item-bg));
  --effective-nav-item-border: var(--site-nav-item-border-override, var(--nav-item-border));
  --effective-nav-item-text: var(--site-nav-item-text-override, var(--nav-item-text));
  --effective-nav-item-hover-bg: var(--site-nav-item-hover-bg-override, var(--nav-item-hover-bg));
  --effective-nav-item-hover-text: var(--site-nav-item-hover-text-override, var(--nav-item-hover-text));
  width: var(--site-nav-width, 100%);
  height: var(--site-nav-height, auto);
  background-color: var(--effective-nav-bg);
  background-image: var(--effective-nav-bg-image);
  background-repeat: var(--effective-nav-bg-repeat);
  background-size: var(--effective-nav-bg-size);
  background-position: var(--effective-nav-bg-position);
  background-attachment: var(--effective-nav-bg-attachment);
  border-bottom: 2px solid var(--nav-border);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

body[data-section="admin"] .navbar {
  --effective-nav-bg: var(--site-nav-bg-override, var(--admin-nav-bg));
}

body[data-nav-position="left"] {
  display: grid;
  grid-template-columns: var(--site-nav-width, 280px) minmax(0, 1fr);
  align-items: start;
}

body[data-nav-position="left"] > *:not(.navbar) {
  grid-column: 2;
  min-width: 0;
}

body[data-nav-position="left"] .navbar {
  grid-column: 1;
  grid-row: 1 / span 30;
  align-self: start;
  min-height: var(--site-nav-height, 100vh);
}

body[data-nav-position="right"] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--site-nav-width, 280px);
  align-items: start;
}

body[data-nav-position="right"] > *:not(.navbar) {
  grid-column: 1;
  min-width: 0;
}

body[data-nav-position="right"] .navbar {
  grid-column: 2;
  grid-row: 1 / span 30;
  align-self: start;
  min-height: var(--site-nav-height, 100vh);
}

body[data-nav-position="bottom"] {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body[data-nav-position="bottom"] > *:not(.navbar) {
  order: 1;
}

body[data-nav-position="bottom"] .navbar {
  order: 20;
  position: static;
  margin-top: auto;
}

.navbar[data-nav-position="left"],
.navbar[data-nav-position="right"] {
  position: sticky;
  top: 0;
}

.nav-container {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
}

.navbar[data-nav-position="left"] .nav-container,
.navbar[data-nav-position="right"] .nav-container {
  max-width: none;
  min-height: var(--site-nav-height, 100vh);
  align-items: stretch;
  flex-direction: column;
  justify-content: flex-start;
}

.nav-title-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.nav-title {
  color: var(--effective-nav-title);
  text-decoration: none;
  font-size: var(--site-nav-title-font-size, 18px);
  font-weight: bold;
  white-space: nowrap;
}

.nav-title:hover {
  color: var(--effective-nav-title-hover);
}

.nav-title-meta {
  display: none;
  color: var(--effective-nav-title-hover);
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body[data-section="admin"] .nav-title-meta {
  display: block;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.navbar[data-nav-position="left"] .nav-links,
.navbar[data-nav-position="right"] .nav-links {
  width: 100%;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
}

.nav-links li {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
}

.nav-links .is-hidden {
  display: none;
}

.nav-links li a,
.nav-links .nav-button,
.nav-dropdown > summary {
  color: var(--effective-nav-item-text);
  text-decoration: none;
  padding: 8px 12px;
  border: 1px solid var(--effective-nav-item-border);
  background-color: var(--effective-nav-item-bg);
  display: inline-block;
  font-size: 16px;
  line-height: 1.2;
  white-space: nowrap;
}

.navbar[data-nav-position="left"] .nav-links li a,
.navbar[data-nav-position="left"] .nav-links .nav-button,
.navbar[data-nav-position="left"] .nav-dropdown > summary,
.navbar[data-nav-position="right"] .nav-links li a,
.navbar[data-nav-position="right"] .nav-links .nav-button,
.navbar[data-nav-position="right"] .nav-dropdown > summary {
  width: 100%;
}

.nav-links li a:hover,
.nav-links .nav-button:hover,
.nav-dropdown > summary:hover {
  background-color: var(--effective-nav-item-hover-bg);
  color: var(--effective-nav-item-hover-text);
  border-color: var(--effective-nav-item-hover-text);
}

.nav-links form {
  display: inline;
  margin: 0;
}

.nav-links .nav-button,
.nav-dropdown > summary {
  cursor: pointer;
}

.nav-dropdown-item {
  position: relative;
}

.nav-dropdown {
  position: relative;
  display: block;
}

.nav-dropdown > summary {
  list-style: none;
  position: relative;
  padding-right: 30px;
  min-width: max-content;
}

.nav-dropdown > summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown > summary::after {
  content: "▾";
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  font-size: 12px;
  line-height: 1;
}

.nav-dropdown[open] > summary::after {
  content: "▴";
}

.nav-dropdown-panel {
  position: absolute;
  top: 100%;
  left: 0;
  display: none;
  min-width: 210px;
  max-width: min(320px, calc(100vw - 32px));
  gap: 6px;
  margin: 0;
  padding: 10px;
  list-style: none;
  background-color: var(--panel-bg);
  border: 1px solid var(--panel-border);
  box-shadow: 4px 4px 0 var(--panel-shadow-color);
  z-index: 240;
}

.nav-dropdown[open] > .nav-dropdown-panel {
  display: grid;
}

.nav-dropdown > summary::after {
  content: "\25BE";
}

.nav-dropdown[open] > summary::after {
  content: "\25B4";
}

.nav-dropdown-panel li {
  width: 100%;
}

.nav-dropdown-panel a,
.nav-empty-group {
  display: block;
  width: 100%;
  padding: 6px 10px;
  text-decoration: none;
  box-sizing: border-box;
}

.nav-dropdown-panel .nav-dropdown {
  width: 100%;
}

.nav-dropdown-panel .nav-dropdown > summary {
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.nav-dropdown-panel .nav-dropdown > summary::after {
  content: "\25B8";
}

.nav-dropdown-panel .nav-dropdown[open] > summary::after {
  content: "\25BE";
}

.nav-dropdown-panel a {
  color: var(--effective-nav-item-text);
  background-color: var(--effective-nav-item-bg);
  border: 1px solid var(--effective-nav-item-border);
  font-size: 15px;
  line-height: 1.2;
}

.nav-dropdown-panel a:hover {
  background-color: var(--effective-nav-item-hover-bg);
  color: var(--effective-nav-item-hover-text);
  border-color: var(--effective-nav-item-hover-text);
}

.nav-empty-group {
  color: var(--page-muted);
  background-color: var(--surface-muted);
  border: 1px dashed var(--panel-border);
  font-size: 14px;
}

.navbar[data-nav-position="top"] .nav-dropdown-panel .nav-dropdown-panel,
.navbar[data-nav-position="bottom"] .nav-dropdown-panel .nav-dropdown-panel {
  top: 0;
  left: 100%;
}

.navbar[data-nav-position="left"] .nav-dropdown-panel,
.navbar[data-nav-position="right"] .nav-dropdown-panel {
  top: 0;
  left: 100%;
  min-width: min(240px, calc(100vw - 340px));
  max-width: min(320px, calc(100vw - 32px));
}

.navbar[data-nav-position="right"] .nav-dropdown-panel {
  right: 100%;
  left: auto;
}

.navbar[data-nav-position="right"] .nav-dropdown-panel .nav-dropdown-panel {
  right: 100%;
  left: auto;
}

.navbar[data-nav-position="left"] .nav-dropdown > summary,
.navbar[data-nav-position="right"] .nav-dropdown > summary {
  min-width: 0;
}

@media (max-width: 720px) {
  .nav-dropdown-panel .nav-dropdown-panel,
  .navbar[data-nav-position="left"] .nav-dropdown-panel,
  .navbar[data-nav-position="right"] .nav-dropdown-panel {
    position: static;
    left: auto;
    right: auto;
    min-width: 0;
    max-width: none;
    margin-top: 8px;
    box-shadow: none;
  }
}

.theme-picker {
  color: var(--effective-nav-item-text);
  font-size: 14px;
  white-space: nowrap;
}

.theme-form {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.navbar[data-nav-position="left"] .theme-form,
.navbar[data-nav-position="right"] .theme-form {
  flex-direction: column;
  align-items: stretch;
}

.theme-form label {
  margin: 0;
  font-weight: bold;
}

.theme-select {
  width: auto;
  min-width: 130px;
  color: var(--effective-nav-item-text);
  background-color: var(--effective-nav-item-bg);
  border: 1px solid var(--effective-nav-item-border);
  padding: 6px 8px;
}

.theme-select:hover {
  background-color: var(--effective-nav-item-hover-bg);
  color: var(--effective-nav-item-hover-text);
}

.nav-inline-button {
  padding: 6px 10px;
}

body > header {
  max-width: 800px;
  margin: 34px auto 0;
  padding: 0 20px;
  text-align: center;
}

body > header + main {
  margin-top: 20px;
}

main {
  max-width: 800px;
  margin: 28px auto 0;
  background-color: var(--panel-bg);
  background-image: var(--panel-bg-image);
  background-position: var(--panel-bg-position);
  background-size: var(--panel-bg-size);
  background-repeat: var(--panel-bg-repeat);
  border: 2px solid var(--panel-border);
  padding: 22px;
  box-shadow: 5px 5px 0 var(--panel-shadow-color);
}


body[data-section="admin"] > header {
  max-width: none;
  width: min(1120px, calc(100vw - 24px));
  margin: 14px auto 0;
  padding: 0 10px;
  text-align: left;
}

body[data-section="admin"] > header + main {
  margin-top: 10px;
}

body[data-section="admin"] main {
  max-width: none;
  width: min(1120px, calc(100vw - 24px));
  margin: 12px auto 0;
  padding: 12px 14px 16px;
  border-width: 1px;
  background-color: var(--admin-shell-bg);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
}

body[data-section="admin"] h1 {
  margin-bottom: 8px;
}

body[data-section="admin"] h2 {
  margin-top: 0;
  font-size: 19px;
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 10px;
}

body[data-section="admin"] .back-link {
  display: inline-block;
  margin-bottom: 10px;
}

body[data-section="admin"] p {
  margin-bottom: 12px;
}

body[data-section="admin"] ul {
  gap: 8px;
}

body[data-section="admin"] li {
  margin-bottom: 0;
  padding: 0;
  border: none;
  background: transparent;
}

body[data-section="admin"] .widget-panel,
body[data-section="admin"] .widget-card {
  padding: 12px;
  border-width: 1px;
  box-shadow: none;
  background-color: var(--admin-panel-bg);
}

body[data-section="admin"] .widget-panel-head,
body[data-section="admin"] .widget-card-head {
  margin-bottom: 8px;
}

body[data-section="admin"] .message {
  margin: 10px 0;
}

body[data-section="admin"] button,
body[data-section="admin"] input,
body[data-section="admin"] textarea,
body[data-section="admin"] select {
  font-size: 12px;
}

body[data-section="admin"] button {
  border-width: 1px;
  border-style: solid;
  border-color: var(--admin-control-border);
  padding: 4px 7px;
  min-height: 28px;
  background-color: var(--admin-button-bg);
  color: var(--admin-button-text);
  box-shadow: none;
  line-height: 1.15;
}

body[data-section="admin"] button:hover {
  background-color: var(--admin-button-hover-bg);
}

body[data-section="admin"] input[type="text"],
body[data-section="admin"] input[type="password"],
body[data-section="admin"] input[type="email"],
body[data-section="admin"] textarea,
body[data-section="admin"] select {
  padding: 4px 6px;
  min-height: 30px;
  line-height: 1.2;
  background-color: var(--admin-control-bg);
  border-color: var(--admin-control-border);
}

body[data-section="admin"] textarea {
  min-height: 100px;
}

input::placeholder,
textarea::placeholder {
  color: inherit;
  opacity: 0.46;
}

body[data-section="admin"] input[type="color"] {
  background-color: var(--admin-control-bg);
  border: 1px solid var(--admin-control-border);
}

body[data-section="admin"] code,
body[data-section="admin"] pre {
  background-color: var(--code-bg);
}

body[data-section="admin"] .widget-grid,
body[data-section="admin"] .widget-detail-grid,
body[data-section="admin"] .widget-toolbar,
body[data-section="admin"] .widget-form,
body[data-section="admin"] .theme-builder-grid,
body[data-section="admin"] .nav-builder-layout,
body[data-section="admin"] .nav-builder-stack {
  gap: 12px;
}

body[data-section="admin"] .widget-card,
body[data-section="admin"] .widget-panel,
body[data-section="admin"] .nav-builder-field-group,
body[data-section="admin"] .nav-item-card,
body[data-section="admin"] .nav-child-card,
body[data-section="admin"] .theme-builder-toolbar,
body[data-section="admin"] .theme-controls-panel,
body[data-section="admin"] .theme-previews-panel,
body[data-section="admin"] .saved-themes-panel,
body[data-section="admin"] .theme-control,
body[data-section="admin"] .theme-group,
body[data-section="admin"] .article-preview-card {
  box-shadow: none;
  border-width: 1px;
}

body[data-section="admin"] .nav-builder-field-group,
body[data-section="admin"] .nav-item-card,
body[data-section="admin"] .nav-child-card,
body[data-section="admin"] .theme-builder-toolbar,
body[data-section="admin"] .theme-controls-panel,
body[data-section="admin"] .theme-previews-panel,
body[data-section="admin"] .saved-themes-panel {
  padding: 10px 12px;
  background-color: var(--admin-panel-bg);
}

body[data-section="admin"] .nav-builder-grid,
body[data-section="admin"] .theme-builder-heading,
body[data-section="admin"] .theme-builder-meta {
  gap: 10px;
}

body[data-section="admin"] .nav-builder-note,
body[data-section="admin"] .nav-preview-note,
body[data-section="admin"] .builder-note,
body[data-section="admin"] .builder-status,
body[data-section="admin"] .emoji-picker-help,
body[data-section="admin"] .widget-empty {
  font-size: 13px;
}

body[data-section="admin"] .nav-builder-field-group h3,
body[data-section="admin"] .theme-controls-panel h2,
body[data-section="admin"] .theme-previews-panel h2,
body[data-section="admin"] .saved-themes-panel h2 {
  font-size: 17px;
}

body[data-section="admin"] .theme-controls-list,
body[data-section="admin"] .theme-group-body {
  gap: 8px;
}

body[data-section="admin"] .theme-group summary {
  padding: 6px 8px;
  background-color: var(--admin-panel-bg);
  font-size: 12px;
}

body[data-section="admin"] .theme-control {
  grid-template-columns: minmax(0, 1fr) 108px 44px 88px;
  gap: 6px;
  padding: 6px;
  background-color: var(--admin-card-bg);
}

body[data-section="admin"] .theme-control-label span {
  font-size: 11px;
}

body[data-section="admin"] .theme-control input[type="color"] {
  width: 44px;
  min-width: 44px;
  height: 30px;
  padding: 2px;
}

body[data-section="admin"] .theme-control input[type="text"] {
  padding: 4px 6px;
}

body[data-section="admin"] .theme-control-example {
  min-height: 30px;
  padding: 3px 6px;
  font-size: 11px;
}

body[data-section="admin"] .nav-item-card,
body[data-section="admin"] .nav-child-card {
  gap: 10px;
}

body[data-section="admin"] .nav-preview-shell {
  min-height: 300px;
  border-width: 1px;
}

body[data-section="admin"] .nav-preview-bar {
  padding: 10px 12px;
}

body[data-section="admin"] .nav-preview-content {
  padding: 12px;
}

body[data-section="admin"] .nav-preview-link,
body[data-section="admin"] .nav-preview-summary,
body[data-section="admin"] .nav-preview-chip {
  padding: 7px 10px;
  font-size: 14px;
}

body[data-section="admin"] .nav-color-control input[type="color"] {
  width: 40px;
  min-width: 40px;
  min-height: 30px;
}

body[data-section="admin"] .admin-card,
body[data-section="admin"] .admin-list li,
body[data-section="admin"] .nav-item-card,
body[data-section="admin"] .nav-child-card,
body[data-section="admin"] .theme-group,
body[data-section="admin"] .article-preview-card {
  background-color: var(--admin-card-bg);
}

body[data-section="admin"] .admin-card {
  padding: 14px;
  gap: 10px;
}

body[data-section="admin"] .admin-list li {
  padding: 8px 10px;
  border-color: var(--panel-border);
}

body[data-section="admin"] .action-link,
body[data-section="admin"] .edit-btn,
body[data-section="admin"] .delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid var(--admin-control-border);
  font-family: inherit;
  font-size: 12px;
  line-height: 1.15;
  text-decoration: none;
  box-shadow: none;
}

body[data-section="admin"] .action-link,
body[data-section="admin"] .edit-btn {
  background-color: var(--admin-button-bg);
  color: var(--admin-button-text);
}

body[data-section="admin"] .action-link:hover,
body[data-section="admin"] .edit-btn:hover {
  background-color: var(--admin-button-hover-bg);
  color: var(--admin-button-text);
}

body[data-section="admin"] .delete-btn {
  background-color: var(--error-border);
  border-color: var(--error-border);
  color: #ffffff;
}

body[data-section="admin"] .delete-btn:hover {
  background-color: #b33b3b;
}

body[data-section="admin"] .action-buttons,
body[data-section="admin"] .nav-upload-row,
body[data-section="admin"] .nav-inline-actions,
body[data-section="admin"] .nav-item-toolbar,
body[data-section="admin"] .nav-item-actions,
body[data-section="admin"] .nav-child-actions,
body[data-section="admin"] .meta-actions {
  gap: 6px;
}
.login-shell {
  max-width: 420px;
}

.page-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--heading-color);
}

h1 {
  font-size: 30px;
  margin: 0 0 10px;
}

h2 {
  font-size: 20px;
  border-bottom: 1px solid var(--panel-rule);
  padding-bottom: 5px;
  margin-top: 30px;
  margin-bottom: 15px;
}

p {
  margin: 0 0 15px;
}

ul {
  list-style: none;
  padding: 0;
}

li {
  margin-bottom: 10px;
  padding: 8px;
  border: 1px solid var(--panel-rule);
  background-color: var(--list-bg);
}

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

a:hover {
  color: var(--link-hover);
}

.back-link {
  display: inline-block;
  margin-bottom: 16px;
}

.article-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.article-heading-row h1 {
  margin: 0;
}

.article-edit-link {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid var(--panel-border);
  background-color: var(--surface-muted);
  text-decoration: none;
  white-space: nowrap;
}

.article-edit-link:hover {
  background-color: var(--surface-accent);
}

.article-page .article-meta,
.status-line {
  color: var(--page-muted);
}

.article-page .article-meta {
  margin-bottom: 20px;
}

.article-content p {
  margin: 0;
}

.article-content p + p {
  margin-top: 10px;
}

.custom-emoji-inline {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  height: 1.45em;
  margin: 0 0.08em;
  vertical-align: -0.22em;
  line-height: 1;
}

.custom-emoji-inline img {
  display: block;
  height: 100%;
  width: auto;
  max-width: none;
}

.article-content p:empty,
.article-content p:has(br:only-child) {
  margin: 0;
}

.article-preview-card {
  min-height: 300px;
  border: 1px solid var(--panel-border);
  background-color: var(--panel-bg);
  padding: 20px;
}

.preview-meta,
.preview-empty {
  color: var(--page-muted);
}

.preview-empty {
  font-style: italic;
}

.emoji-manager {
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid var(--panel-border);
  background-color: var(--surface-muted);
}

.emoji-manager h2 {
  margin-top: 0;
}

.emoji-manager p:last-child {
  margin-bottom: 0;
}

.emoji-manager.admin-accordion-shell {
  padding: 0;
  overflow: hidden;
}

.admin-accordion {
  display: block;
}

.admin-accordion-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

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

.admin-accordion-summary::after {
  content: "+";
  flex: 0 0 auto;
  min-width: 1.5em;
  text-align: center;
  color: var(--page-muted);
  font-weight: bold;
}

.admin-accordion[open] > .admin-accordion-summary::after {
  content: "-";
}

.admin-accordion-summary:hover {
  background-color: rgba(120, 135, 150, 0.08);
}

.admin-accordion-summary-main {
  min-width: 0;
  flex: 1 1 auto;
}

.admin-accordion-summary-main h2 {
  margin: 0 0 4px;
}

.admin-accordion-summary-main p {
  margin: 0;
}

.admin-accordion-panel {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
  border-top: 1px solid var(--panel-border);
}

.admin-accordion-summary-meta {
  margin: 0;
  white-space: nowrap;
}

.emoji-manager-body > header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.emoji-manager-count {
  color: var(--page-muted);
  white-space: nowrap;
}

.emoji-upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.emoji-upload-row input[type="text"],
.emoji-upload-row input[type="search"] {
  flex: 1 1 180px;
}

.emoji-upload-row input[type="file"] {
  width: auto;
  max-width: 100%;
}

.emoji-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.emoji-picker-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
  padding: 8px;
  border: 1px solid var(--panel-border);
  background-color: var(--panel-bg);
}

.emoji-picker-insert,
.emoji-picker-delete {
  font: inherit;
}

.emoji-picker-insert {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  text-align: left;
}

.emoji-picker-delete {
  padding: 8px 10px;
  background-color: var(--error-border);
  border-color: var(--error-border);
  color: #ffffff;
}

.emoji-picker-delete:hover {
  background-color: #b33b3b;
}

.emoji-picker-asset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  border: 1px solid var(--panel-border);
  background-color: var(--input-bg);
}

.emoji-picker-asset .custom-emoji-inline {
  height: 30px;
  margin: 0;
  vertical-align: middle;
}

.emoji-picker-meta {
  min-width: 0;
}

.emoji-picker-token {
  display: block;
  margin-bottom: 4px;
}

.emoji-picker-help {
  color: var(--page-muted);
  font-size: 13px;
}

.emoji-picker-empty {
  color: var(--page-muted);
  font-style: italic;
  margin: 0;
}

.widget-grid,
.widget-detail-grid {
  display: grid;
  gap: 16px;
}

.widget-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.widget-card,
.widget-panel {
  border: 1px solid var(--panel-border);
  background-color: var(--panel-bg);
  padding: 16px;
}

.widget-card h2,
.widget-panel h2,
.widget-panel h3 {
  margin-top: 0;
}

.widget-card-head,
.widget-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.widget-panel-head {
  margin-bottom: 12px;
}

.widget-status-badge {
  display: inline-block;
  padding: 4px 8px;
  border: 1px solid var(--panel-border);
  background-color: var(--surface-muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.widget-status-badge.is-enabled {
  color: var(--success-border);
}

.widget-status-badge.is-disabled {
  color: var(--error-border);
}

.widget-meta-list,
.widget-capability-list,
.widget-info-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.widget-capability-list,
.widget-info-list {
  margin-top: 0;
}

.widget-meta-list li,
.widget-capability-list li,
.widget-info-list li {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
}

.widget-detail-grid {
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  align-items: start;
}

.widget-preview-surface {
  min-height: 140px;
  border: 1px solid var(--panel-border);
  background-color: var(--list-bg);
  padding: 16px;
}

.widget-preview-placeholder {
  display: grid;
  gap: 8px;
  max-width: 520px;
  padding: 12px;
  border: 1px dashed var(--panel-border);
  background-color: var(--surface-muted);
}

.widget-preview-placeholder strong,
.widget-preview-placeholder code {
  display: block;
}

.widget-preview-placeholder p {
  margin: 0;
  color: var(--page-muted);
}

.widget-code-block {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--panel-border);
  background-color: var(--code-bg);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.widget-inline-token {
  margin: 12px 0;
  padding: 12px;
  border: 1px dashed var(--panel-border);
  background-color: var(--surface-muted);
}

.widget-inline-token strong,
.widget-inline-token code {
  display: block;
  margin-bottom: 6px;
}

.widget-inline-token p {
  margin: 0;
  color: var(--page-muted);
}

.widget-inline-token.is-loading {
  border-style: dotted;
  opacity: 0.88;
}

.widget-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.widget-toolbar a {
  display: inline-block;
}

.widget-form {
  display: grid;
  gap: 14px;
}

.widget-form label {
  font-weight: bold;
}

.widget-form textarea {
  min-height: 120px;
}

.widget-form-toggle {
  display: flex;
  gap: 10px;
  align-items: center;
}

.widget-form-toggle input[type="checkbox"] {
  width: auto;
}

.widget-settings-panel {
  display: grid;
  gap: 12px;
}

.widget-settings-grid {
  display: grid;
  gap: 12px;
}

.widget-settings-field {
  display: grid;
  gap: 6px;
}

.widget-settings-multiselect {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--panel-border);
  background-color: var(--input-bg);
}

.widget-settings-choice {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-weight: normal;
}

.widget-settings-choice input[type="checkbox"] {
  width: auto;
  margin: 2px 0 0;
}

.widget-settings-choice-empty {
  margin: 0;
  color: var(--page-muted);
}

.widget-settings-help,
.widget-settings-empty {
  margin: 0;
  font-size: 13px;
  color: var(--page-muted);
}

.widget-settings-checkbox {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: normal;
}

.widget-settings-checkbox input[type="checkbox"] {
  width: auto;
}

.widget-instance-list {
  display: grid;
  gap: 10px;
}

.widget-instance-card {
  border: 1px solid var(--panel-border);
  background-color: var(--list-bg);
  padding: 12px;
}

.widget-instance-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.widget-instance-card-head strong,
.widget-instance-card-head code {
  display: block;
}

.widget-instance-card-actions,
.widget-instance-form-actions,
.widget-picker-actions,
.widget-picker-instance-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.widget-instance-token-preview {
  margin: 0;
  padding: 10px 12px;
  border: 1px dashed var(--panel-border);
  background-color: var(--surface-muted);
  font-family: monospace;
  word-break: break-word;
}

.widget-picker-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.widget-picker-card > * {
  min-width: 0;
}

.widget-picker-card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
}

.widget-picker-card-name {
  line-height: 1.2;
}

.widget-picker-card .emoji-picker-token {
  display: inline-block;
  width: auto;
  max-width: 100%;
  margin-bottom: 0;
  overflow-wrap: anywhere;
}

.widget-picker-card-description {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

.widget-picker-actions,
.widget-picker-instance-list {
  margin-top: 0;
}

.widget-picker-instance-list {
  display: grid;
  gap: 6px;
  width: 100%;
}

.widget-picker-grid .widget-picker-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 24px;
  padding: 6px 8px;
  border: 1px solid var(--panel-border);
  background-color: var(--button-bg);
  color: var(--button-text);
  font: inherit;
  font-size: 11px;
  line-height: 1.1;
  white-space: nowrap;
  cursor: pointer;
  flex: 0 0 auto;
  align-self: flex-start;
}

.widget-picker-grid .widget-picker-action:hover {
  background-color: var(--button-hover);
}

.widget-picker-grid .widget-picker-action-secondary {
  background-color: var(--surface-muted);
  color: var(--page-text);
}

.widget-picker-instance-insert {
  flex: 0 0 auto;
}

.widget-picker-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
  align-items: start;
}

.widget-picker-instance-row {
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  padding-top: 6px;
  border-top: 1px dashed var(--panel-rule);
}

.widget-picker-instance-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.widget-picker-instance-name {
  font-size: 12px;
  line-height: 1.2;
}

.widget-picker-instance-token {
  font-size: 11px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.widget-picker-instance-actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

.widget-empty {
  color: var(--page-muted);
  font-style: italic;
}

img {
  max-width: 100%;
  height: auto;
}

code {
  background-color: var(--code-bg);
  padding: 2px 4px;
}

pre {
  background-color: var(--code-bg);
  padding: 10px;
  overflow-x: auto;
}

blockquote {
  border-left: 4px solid var(--blockquote-border);
  margin-left: 0;
  padding-left: 10px;
}

table {
  border-collapse: collapse;
}

th,
td {
  border: 1px solid var(--panel-border);
  padding: 8px;
}

.message {
  margin: 15px 0;
  padding: 10px;
  border: 1px solid var(--panel-border);
  background-color: var(--panel-bg);
  display: none;
}

.message.show {
  display: block;
}

.message.success {
  border-color: var(--success-border);
  background-color: var(--success-bg);
}

.message.error {
  border-color: var(--error-border);
  background-color: var(--error-bg);
}

.hit-counter-widget {
  margin: 10px 0 14px;
  padding: 4px 8px;
  border: 1px solid var(--panel-border);
  background-color: var(--list-bg);
  display: inline-block;
}

.hit-counter-line {
  margin: 0;
  line-height: 1.3;
}

.hit-counter-value {
  font-size: 1em;
  font-weight: bold;
}

.guestbook-widget {
  margin-top: 32px;
  padding-top: 10px;
  border-top: 1px solid var(--panel-rule);
}

.guestbook-help {
  color: var(--page-muted);
}

.guestbook-form textarea {
  min-height: 130px;
  resize: vertical;
}

.guestbook-list {
  margin: 20px 0 0;
}

.guestbook-entry {
  margin-bottom: 14px;
}

.guestbook-entry-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 8px;
}

.guestbook-entry-meta span {
  color: var(--page-muted);
  font-size: 14px;
}

.guestbook-entry-body {
  margin: 0;
  white-space: normal;
}

.guestbook-entry-empty {
  color: var(--page-muted);
  font-style: italic;
}

.ql-toolbar.ql-snow,
.ql-container.ql-snow {
  border-color: var(--panel-border);
}

.ql-toolbar.ql-snow {
  background-color: var(--surface-muted);
}

.ql-container.ql-snow {
  background-color: var(--input-bg);
  color: var(--page-text);
}

.ql-editor.ql-blank::before {
  color: var(--page-muted);
}

.ql-snow .ql-picker,
.ql-snow .ql-picker-label,
.ql-snow .ql-picker-options {
  color: var(--page-text);
}

.ql-snow .ql-stroke {
  stroke: var(--page-text);
}

.ql-snow .ql-fill {
  fill: var(--page-text);
}

@keyframes page-editor-surface-pulse {
  0%, 100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.015);
  }
}

@keyframes page-editor-surface-float {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

@keyframes page-editor-surface-blink {
  0%, 49% {
    opacity: 1;
  }

  50%, 100% {
    opacity: 0.75;
  }
}

.custom-page-header {
  text-align: left;
}

body > header.custom-page-width-wide,
main.custom-page-width-wide {
  max-width: 1040px;
}

body > header.custom-page-width-full,
main.custom-page-width-full {
  max-width: min(1320px, calc(100vw - 28px));
}

.custom-page-align-center,
.custom-page-align-center .custom-page-header-inner {
  text-align: center;
}

.custom-page-header-inner {
  display: grid;
  gap: 10px;
  color: var(--custom-page-header-text-color, inherit);
}

.custom-page-header-feature .custom-page-header-inner {
  padding: 18px 22px;
  border: 1px solid var(--panel-border);
  background: linear-gradient(180deg, var(--panel-bg), var(--surface-muted));
  box-shadow: 4px 4px 0 var(--panel-shadow-color);
}

.custom-page-header-cover .custom-page-header-inner {
  padding: 24px;
  border: 2px solid var(--panel-border);
  background-color: var(--panel-bg);
  background-image: var(--panel-bg-image);
  background-position: var(--panel-bg-position);
  background-size: var(--panel-bg-size);
  background-repeat: var(--panel-bg-repeat);
  box-shadow: 5px 5px 0 var(--panel-shadow-color);
}

.custom-page-shell {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 22px;
  background-color: transparent;
  background-image: none;
  overflow: hidden;
}

.custom-page-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: var(--custom-page-panel-opacity, 1);
  background-color: var(--custom-page-panel-bg-color, var(--panel-bg));
  background-image: var(--custom-page-panel-bg-image, var(--panel-bg-image));
  background-position: var(--custom-page-panel-bg-position, var(--panel-bg-position));
  background-size: var(--custom-page-panel-bg-size, var(--panel-bg-size));
  background-repeat: var(--custom-page-panel-bg-repeat, var(--panel-bg-repeat));
  background-attachment: var(--custom-page-panel-bg-attachment, scroll);
}

.custom-page-shell > * {
  position: relative;
  z-index: 1;
}

.custom-page-kicker {
  margin: 0 0 6px;
  color: var(--custom-page-header-text-color, var(--page-muted));
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.custom-page-header-inner h1 {
  color: var(--custom-page-header-text-color, var(--heading-color));
}

.custom-page-intro {
  margin: 0;
  color: var(--custom-page-header-text-color, var(--page-muted));
  font-size: 1.05rem;
}

.custom-page-paths {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
}

.custom-page-path {
  margin: 0;
  color: var(--page-muted);
}

.custom-page-path span {
  font-weight: bold;
}

.custom-page-path code {
  padding: 2px 6px;
  background-color: var(--code-bg);
}

.custom-page-sections {
  display: grid;
  gap: 20px;
}

.custom-page-section-row {
  min-width: 0;
}

.custom-page-section-row-halves {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.custom-page-section-row-halves > * {
  min-width: 0;
}

.custom-page-section {
  position: relative;
}

.custom-page-section-width-half {
  min-width: 0;
}

.custom-page-section-spacer {
  min-height: 1px;
}

.custom-page-sections-flow .custom-page-section-surface {
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

.custom-page-sections-flow .custom-page-section-surface::before {
  content: none;
}

.custom-page-sections-flow .custom-page-section.has-custom-background .custom-page-section-surface,
.custom-page-sections-cards .custom-page-section-surface {
  padding: 18px;
  border: 1px solid var(--panel-border);
  box-shadow: 4px 4px 0 var(--panel-shadow-color);
}

.custom-page-sections-flow .custom-page-section.has-custom-background .custom-page-section-surface::before {
  content: "";
}

.custom-page-section-surface {
  position: relative;
  isolation: isolate;
  background-color: transparent;
  background-image: none;
  overflow: hidden;
  transition: outline-color 120ms ease, outline-offset 120ms ease, box-shadow 120ms ease;
}

.custom-page-section-surface::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: var(--section-surface-opacity, 1);
  background-color: var(--section-surface-bg-color, var(--panel-bg));
  background-image: var(--section-surface-bg-image, var(--panel-bg-image));
  background-repeat: var(--section-surface-bg-repeat, var(--panel-bg-repeat));
  background-size: var(--section-surface-bg-size, var(--panel-bg-size));
  background-position: var(--section-surface-bg-position, var(--panel-bg-position));
  background-attachment: var(--section-surface-bg-attachment, scroll);
}

.custom-page-section-surface > * {
  position: relative;
  z-index: 1;
}

.custom-page-section-surface h2 {
  margin-top: 0;
  color: var(--section-title-color, inherit);
}

.custom-page-section-content > :first-child {
  margin-top: 0;
}

.custom-page-section-content > :last-child {
  margin-bottom: 0;
}

.custom-page-empty-state {
  padding: 24px;
  border: 1px dashed var(--panel-border);
  background-color: var(--surface-muted);
}

.custom-page-empty-state h2 {
  margin-top: 0;
}

.custom-page-empty {
  color: var(--page-muted);
  font-style: italic;
}

.page-editor-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 260;
  min-height: 34px;
  padding: 8px 13px;
  border-radius: 999px;
}

.page-editor-root[hidden] {
  display: none;
}

.page-editor-root::before,
.page-editor-root::after {
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.page-editor-root[data-page-editor-context="page"]::before,
.page-editor-root[data-page-editor-context="page"]::after {
  position: fixed;
  opacity: 1;
}

.page-editor-root[data-page-editor-context="page"]::before {
  content: "";
  inset: 12px;
  z-index: 250;
  border: 2px dashed rgba(168, 124, 26, 0.88);
  background: rgba(255, 242, 205, 0.08);
}

.page-editor-root[data-page-editor-context="page"]::after {
  content: "Page background";
  top: 16px;
  left: 16px;
  z-index: 251;
  padding: 4px 8px;
  border: 1px solid rgba(168, 124, 26, 0.88);
  background: rgba(255, 242, 205, 0.96);
  color: #553d00;
  font-size: 12px;
  font-weight: bold;
}

.page-editor-root.is-backgrounded .page-editor-window {
  opacity: 0.46;
}

.page-editor-root.has-active-window .page-editor-window {
  opacity: 0.46;
}

.page-editor-root.has-active-window:not(.is-backgrounded) .page-editor-toolbar-window,
.page-editor-root.has-active-window:not(.is-backgrounded) .page-editor-ribbon-window {
  opacity: 0.97;
}

.page-editor-root.has-active-window .page-editor-window.is-active-window {
  opacity: 0.97;
}

.page-editor-root.is-backgrounded.has-active-window .page-editor-window.is-active-window {
  opacity: 0.46;
}

.page-editor-window[hidden] {
  display: none;
}

body.page-editor-is-editing .custom-page-section {
  cursor: pointer;
}

body.page-editor-is-editing #custom-page-header,
body.page-editor-is-editing main.custom-page-shell {
  position: relative;
  transition: outline-color 120ms ease, outline-offset 120ms ease, box-shadow 120ms ease;
}

body.page-editor-is-editing #custom-page-header:hover,
body.page-editor-is-editing main.custom-page-shell:hover {
  outline: 1px dashed rgba(22, 34, 53, 0.45);
  outline-offset: 4px;
  cursor: pointer;
}

body.page-editor-is-editing[data-page-editor-context="header"] #custom-page-header,
body.page-editor-is-editing[data-page-editor-context="panel"] main.custom-page-shell {
  outline: 3px dashed var(--nav-title);
  outline-offset: 6px;
}

body.page-editor-is-editing[data-page-editor-context="header"] #custom-page-header::after,
body.page-editor-is-editing[data-page-editor-context="panel"] main.custom-page-shell::after {
  position: absolute;
  top: -14px;
  left: 12px;
  padding: 4px 8px;
  border: 1px solid rgba(168, 124, 26, 0.88);
  background: rgba(255, 242, 205, 0.96);
  color: #553d00;
  font-size: 12px;
  font-weight: bold;
}

body.page-editor-is-editing[data-page-editor-context="header"] #custom-page-header::after {
  content: "Header";
}

body.page-editor-is-editing[data-page-editor-context="panel"] main.custom-page-shell::after {
  content: "Main panel";
}

body.page-editor-is-editing .custom-page-section:not(.is-selected):hover .custom-page-section-surface {
  outline: 1px dashed rgba(22, 34, 53, 0.45);
  outline-offset: 3px;
}

body.page-editor-is-editing .custom-page-section-content.is-empty-preview,
body.page-editor-is-editing .custom-page-section-content:empty {
  display: block;
  min-height: 38px;
}

body.page-editor-is-editing .custom-page-section-content.is-empty-preview::before,
body.page-editor-is-editing .custom-page-section-content:empty::before {
  content: "Empty section content";
  display: inline-block;
  padding: 5px 8px;
  border: 1px dashed rgba(85, 100, 118, 0.45);
  background: transparent;
  color: #435365;
  font-size: 12px;
  font-style: italic;
}

body.page-editor-is-editing .custom-page-section.is-rule-hidden-preview .custom-page-section-surface {
  opacity: 0.74;
}

body.page-editor-is-editing .custom-page-section.has-invalid-display-rule .custom-page-section-surface {
  outline: 2px dashed #b84c4c;
  outline-offset: 4px;
}

.custom-page-section-rule-note {
  margin: 0 0 10px;
  padding: 6px 8px;
  border: 1px dashed rgba(85, 100, 118, 0.45);
  background: rgba(255, 255, 255, 0.6);
  color: #435365;
  font-size: 12px;
}

.custom-page-section-rule-note.is-error {
  border-color: rgba(143, 27, 27, 0.55);
  background: rgba(255, 220, 220, 0.8);
  color: #5a0a0a;
}

body.page-editor-is-editing .custom-page-section-action-bar {
  display: flex;
  opacity: 0;
  pointer-events: none;
}

body.page-editor-is-editing .custom-page-section:hover .custom-page-section-action-bar,
body.page-editor-is-editing .custom-page-section.is-selected .custom-page-section-action-bar {
  opacity: 1;
  pointer-events: auto;
}

.custom-page-section-action-bar {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: none;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
  transition: opacity 120ms ease;
}

.custom-page-section-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(3px);
  color: #122034;
  font-size: 12px;
  line-height: 1;
  font-weight: bold;
  box-shadow: none;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.custom-page-section-action-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.custom-page-section-edit-button {
  border-color: rgba(82, 101, 124, 0.72);
  background: rgba(236, 244, 252, 0.84);
  color: #16324d;
}

.custom-page-section-move-button {
  min-width: 26px;
  padding: 5px 7px;
  border-color: rgba(72, 111, 72, 0.74);
  background: rgba(224, 243, 224, 0.84);
  color: #1d4a28;
}

.custom-page-section-layout-button {
  border-color: rgba(169, 125, 26, 0.84);
  background: rgba(255, 242, 205, 0.88);
  color: #6a4a00;
}

.custom-page-section-swap-button {
  min-width: 32px;
  padding: 5px 8px;
  border-color: rgba(63, 93, 138, 0.8);
  background: rgba(223, 236, 255, 0.88);
  color: #1f4170;
  font-size: 13px;
}

.custom-page-section-delete-button {
  border-color: rgba(143, 43, 43, 0.82);
  background: rgba(223, 115, 115, 0.84);
  color: #ffffff;
}

.custom-page-section-action-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.95);
}

body.page-editor-is-editing .custom-page-section:hover .custom-page-section-edit-button,
body.page-editor-is-editing .custom-page-section.is-selected .custom-page-section-edit-button,
.custom-page-section-edit-button:hover:not(:disabled) {
  background: rgba(255, 243, 191, 0.92);
  border-color: rgba(143, 127, 61, 0.9);
  color: #302812;
}

.custom-page-section-move-button:hover:not(:disabled),
body.page-editor-is-editing .custom-page-section.is-selected .custom-page-section-move-button {
  background: rgba(203, 236, 206, 0.94);
  border-color: rgba(48, 99, 59, 0.86);
  color: #17381e;
}

.custom-page-section-layout-button:hover:not(:disabled),
body.page-editor-is-editing .custom-page-section.is-selected .custom-page-section-layout-button {
  background: rgba(255, 233, 161, 0.94);
  border-color: rgba(145, 105, 14, 0.92);
  color: #593d00;
}

.custom-page-section-swap-button:hover:not(:disabled),
body.page-editor-is-editing .custom-page-section.is-selected .custom-page-section-swap-button {
  background: rgba(204, 226, 255, 0.95);
  border-color: rgba(38, 71, 120, 0.88);
  color: #173257;
}

.custom-page-section-delete-button:hover {
  background: rgba(191, 73, 73, 0.94);
  border-color: rgba(124, 29, 29, 0.92);
  color: #ffffff;
}

.custom-page-section.is-selected .custom-page-section-surface {
  outline: 3px dashed var(--nav-title);
  outline-offset: 4px;
}

.custom-page-builder-footer {
  display: flex;
  justify-content: center;
  padding: 12px 0 4px;
}

.custom-page-builder-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 12px;
  border: 1px solid rgba(52, 91, 138, 0.75);
  border-radius: 999px;
  background: rgba(221, 236, 252, 0.76);
  backdrop-filter: blur(3px);
  color: #123050;
  font-size: 12px;
  font-weight: bold;
  line-height: 1;
  box-shadow: none;
}

.custom-page-builder-action-button:hover {
  background: rgba(238, 246, 255, 0.94);
  border-color: rgba(34, 74, 120, 0.88);
  color: #0f2a45;
}

.page-editor-window {
  --page-editor-text: #162235;
  --page-editor-muted: #556476;
  --page-editor-control-bg: #ffffff;
  --page-editor-control-border: #9aa4b0;
  --page-editor-note-bg: #f3f5f8;
  --page-editor-note-border: #92a0b0;
  --page-editor-code-bg: #dde4ec;
  position: fixed;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(420px, calc(100vw - 24px));
  max-height: calc(100vh - 120px);
  border: 1px solid #7d8795;
  border-top-color: #f8f9fb;
  border-left-color: #f8f9fb;
  background: #e8edf3;
  color: var(--page-editor-text);
  box-shadow: 12px 14px 28px rgba(14, 24, 38, 0.3);
  overflow: hidden;
  z-index: 300;
  opacity: 0.97;
  transition: opacity 120ms ease;
}

.page-editor-toolbar-window {
  top: 84px;
  left: 18px;
  width: min(460px, calc(100vw - 24px));
  max-height: min(42vh, calc(100vh - 110px));
}

.page-editor-ribbon-window {
  top: 84px;
  left: 496px;
  right: 18px;
  width: auto;
  max-height: min(38vh, calc(100vh - 110px));
  overflow: visible;
}

.page-editor-panel-window {
  top: 238px;
  left: 18px;
  width: min(400px, calc(100vw - 24px));
}

.page-editor-layout-window {
  top: 238px;
  left: 438px;
  width: min(340px, calc(100vw - 24px));
}

.page-editor-advanced-window {
  top: 518px;
  left: 18px;
  width: min(420px, calc(100vw - 24px));
}

.page-editor-section-window {
  top: 238px;
  right: 18px;
  width: min(480px, calc(100vw - 24px));
}

.page-editor-style-advanced-window {
  top: 518px;
  left: 458px;
  width: min(460px, calc(100vw - 24px));
}

.page-editor-titlebar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin: 0;
  padding: 2px 5px 2px 6px;
  box-sizing: border-box;
  align-self: stretch;
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #ffffff;
  font-size: 0.7rem;
  line-height: 1.05;
  font-weight: bold;
  user-select: none;
  cursor: move;
}

.page-editor-titlebar span {
  flex: 1 1 auto;
  min-width: 0;
}

.page-editor-titlebar-button {
  flex: 0 0 auto;
  min-width: 18px;
  min-height: 16px;
  margin: 0;
  padding: 0 4px;
  border: 1px solid #ffffff;
  border-right-color: #2b2b2b;
  border-bottom-color: #2b2b2b;
  background: #c0c0c0;
  color: #000000;
  font-size: 0.68rem;
  line-height: 1;
  font-weight: bold;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
}

.page-editor-titlebar-button:hover {
  background: #f3f3f3;
}

.page-editor-window-body {
  display: grid;
  gap: 7px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 9px 10px 10px;
  background: linear-gradient(180deg, #f1f4f8 0%, #e7ebf1 100%);
}

.page-editor-toolbar-window .page-editor-window-body {
  gap: 10px;
  padding: 8px 12px 12px;
}

.page-editor-ribbon-window .page-editor-window-body {
  padding: 0;
  overflow: visible;
}

.page-editor-toolbar-window .page-editor-button-row {
  align-items: center;
}

.page-editor-toolbar-window .page-editor-button-row button {
  flex: 0 1 auto;
  min-width: 124px;
}

.page-editor-toolbar-window .page-editor-toolbar-meta {
  justify-content: flex-start;
}

.page-editor-toolbar-window .page-editor-field-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

@media (max-width: 1180px) {
  .page-editor-toolbar-window,
  .page-editor-ribbon-window {
    left: 12px;
    right: 12px;
    width: auto;
  }

  .page-editor-ribbon-window {
    top: 248px;
    max-height: calc(100vh - 260px);
  }
}

.page-editor-stylebar-shell {
  display: grid;
  gap: 6px;
  padding: 7px;
  border: 1px solid #b5bec9;
  background: linear-gradient(180deg, #fbfcfe 0%, #eef3f8 100%);
}

.page-editor-stylebar-quick-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 6px 7px;
  border: 1px solid #bcc6d1;
  background: linear-gradient(180deg, #f9fbfe 0%, #e9eef5 100%);
}

.page-editor-stylebar-quick-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.page-editor-stylebar-quick-field {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  font-size: 11px;
}

.page-editor-stylebar-quick-field span {
  min-width: 24px;
}

.page-editor-stylebar-quick-field input[type="number"] {
  width: 68px;
}

.page-editor-stylebar-toggle,
.page-editor-stylebar-button {
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid #7d8da1;
  background: linear-gradient(180deg, #ffffff 0%, #eef2f7 100%);
  color: #162235;
  font-size: 12px;
  font-weight: bold;
  line-height: 1.1;
  box-shadow: none;
}

.page-editor-stylebar-toggle.is-active,
.page-editor-stylebar-button.is-active {
  border-color: #b1841b;
  background: linear-gradient(180deg, #fff5d8 0%, #ffe5a5 100%);
  color: #624500;
}

.page-editor-stylebar-toggle:hover:not(:disabled),
.page-editor-stylebar-button:hover:not(:disabled) {
  background: linear-gradient(180deg, #ffffff 0%, #f7ead0 100%);
  border-color: #8b98aa;
}

.page-editor-stylebar-toggle:disabled,
.page-editor-stylebar-button:disabled {
  background: #dde4ec;
  color: #6c7784;
  border-color: #a7b1bc;
  cursor: not-allowed;
}

.page-editor-stylebar-context {
  display: grid;
  gap: 6px;
}

.page-editor-stylebar-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.page-editor-stylebar-menu-layer {
  position: relative;
  min-height: 0;
}

.page-editor-stylebar-menu {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 6;
  display: grid;
  gap: 7px;
  width: min(520px, calc(100vw - 72px));
  max-width: 100%;
  padding: 8px;
  border: 1px solid #8f9cad;
  background: linear-gradient(180deg, #fbfcfe 0%, #edf2f8 100%);
  box-shadow: 0 12px 24px rgba(18, 34, 53, 0.16);
}

.page-editor-stylebar-menu[hidden],
.page-editor-stylebar-context[hidden] {
  display: none !important;
}

.page-editor-ribbon-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.page-editor-ribbon-tab {
  min-height: 28px;
  padding: 5px 7px;
  border: 1px solid #6e7d91;
  background: #ffffff;
  color: #122034;
  font-size: 12px;
  font-weight: bold;
  line-height: 1.1;
  box-shadow: none;
}

.page-editor-ribbon-tab.is-active {
  border-color: #b1841b;
  background: #fff1c7;
  color: #5f4700;
}

.page-editor-ribbon-tab:disabled {
  background: #dde4ec;
  color: #6c7784;
  border-color: #a7b1bc;
  cursor: not-allowed;
}

.page-editor-ribbon-panel {
  display: grid;
  gap: 8px;
}

.page-editor-ribbon-panel[hidden] {
  display: none !important;
}


.page-editor-window label {
  font-weight: bold;
  font-size: 12px;
  margin-bottom: 2px;
  color: var(--page-editor-text);
}

.page-editor-window input[type="text"],
.page-editor-window input[type="number"],
.page-editor-window input[type="range"],
.page-editor-window input[type="color"],
.page-editor-window select,
.page-editor-window textarea {
  padding: 6px 7px;
  color: var(--page-editor-text);
  caret-color: var(--page-editor-text);
  border-color: var(--page-editor-control-border);
  background-color: var(--page-editor-control-bg);
}

.page-editor-window input[type="color"] {
  padding: 2px;
}

.page-editor-window input[type="text"]::placeholder,
.page-editor-window textarea::placeholder {
  color: var(--page-editor-muted);
  opacity: 0.46;
}

.page-editor-window input[type="range"] {
  padding: 0;
}

.page-editor-window textarea {
  min-height: 190px;
  font-family: Consolas, "Courier New", monospace;
}

.page-editor-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.page-editor-position-card {
  display: grid;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid #c5ced9;
  background: #f4f7fb;
}

.page-editor-position-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.page-editor-position-card-title,
.page-editor-position-card-note {
  margin: 0;
}

.page-editor-position-card-title {
  font-size: 12px;
  font-weight: bold;
}

.page-editor-position-card-note {
  color: var(--page-editor-muted);
  font-size: 12px;
}

.page-editor-position-pad {
  position: relative;
  min-height: 100px;
  border: 1px solid #9aa8b8;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(96, 111, 131, 0.28) calc(50% - 1px), rgba(96, 111, 131, 0.28) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(0deg, transparent calc(50% - 1px), rgba(96, 111, 131, 0.28) calc(50% - 1px), rgba(96, 111, 131, 0.28) calc(50% + 1px), transparent calc(50% + 1px)),
    repeating-linear-gradient(90deg, rgba(210, 220, 232, 0.42) 0, rgba(210, 220, 232, 0.42) 1px, transparent 1px, transparent 20px),
    repeating-linear-gradient(0deg, rgba(210, 220, 232, 0.42) 0, rgba(210, 220, 232, 0.42) 1px, transparent 1px, transparent 20px),
    linear-gradient(180deg, #ffffff 0%, #eef3f8 100%);
  overflow: hidden;
  touch-action: none;
  cursor: crosshair;
}

.page-editor-position-thumb {
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  border: 1px solid #475567;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #ffe0a3 38%, #c98b19 100%);
  box-shadow: 0 1px 4px rgba(24, 36, 54, 0.3);
  pointer-events: none;
}

.page-editor-toolbar-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.page-editor-dirty-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid #9fb0c3;
  background: #eef3f8;
  color: var(--page-editor-text);
  font-size: 12px;
  font-weight: bold;
}

.page-editor-dirty-badge.is-dirty {
  border-color: #b1841b;
  background: #fff1c7;
  color: #5f4700;
}

.page-editor-secondary-button {
  padding: 4px 9px;
  border: 1px solid #7a8899;
  background: #ffffff;
  color: #122034;
  font-size: 12px;
  line-height: 1.1;
  font-weight: bold;
}

.page-editor-secondary-button:hover {
  background: #eef4fa;
}

.page-editor-button-row button {
  flex: 1 1 120px;
  padding: 5px 7px;
  border: 1px solid #6e7d91;
  background: #ffffff;
  color: #122034;
  font-size: 12px;
  line-height: 1.1;
  font-weight: bold;
  box-shadow: none;
}

.page-editor-button-row button:hover {
  background: #eef4fa;
  color: #0f1b2b;
}

.page-editor-button-row button:disabled,
.page-editor-secondary-button:disabled {
  background: #dde4ec;
  color: #6c7784;
  border-color: #a7b1bc;
  cursor: not-allowed;
}

.page-editor-upload-row input[type="file"] {
  flex: 1 1 100%;
  width: auto;
}

.page-editor-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.page-editor-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: normal;
}

.page-editor-toggle input {
  width: auto;
}

.page-editor-status {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #b1bac6;
  background: #f7f9fc;
  color: var(--page-editor-text);
  font-size: 12px;
}

.page-editor-status.is-error {
  border-color: #8f1b1b;
  background: #ffdcdc;
  color: #5a0a0a;
}

.page-editor-note {
  margin: 0;
  padding: 8px 10px;
  border: 1px dashed var(--page-editor-note-border);
  background: var(--page-editor-note-bg);
  color: var(--page-editor-text);
  font-size: 12px;
}

.page-editor-note-compact {
  padding: 6px 8px;
}

.page-editor-note.is-error {
  border-color: #8f1b1b;
  background: #ffdcdc;
  color: #5a0a0a;
}

.page-editor-window code,
.page-editor-window pre {
  color: var(--page-editor-text);
  background-color: var(--page-editor-code-bg);
  border: 1px solid #bec9d5;
}

.page-editor-window pre {
  margin: 0;
  padding: 8px 10px;
}

.page-editor-danger {
  background: #b84c4c;
  border-color: #b84c4c;
  color: #ffffff;
}

.page-editor-danger:hover {
  background: #9c3434;
}

.page-editor-widget-picker {
  margin-bottom: 0;
}

.page-editor-widget-picker.emoji-manager {
  padding: 0;
  border: 0;
  background: transparent;
}

.page-editor-widget-picker .emoji-manager-header {
  margin-bottom: 8px;
}

.page-editor-widget-picker h2 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.page-editor-widget-picker .emoji-manager-count {
  color: var(--page-editor-muted);
  font-size: 12px;
}

.page-editor-widget-picker .emoji-picker-grid {
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 6px;
}

.page-editor-widget-picker .emoji-picker-card {
  padding: 6px 7px;
  gap: 5px;
  border-color: var(--page-editor-control-border);
  background-color: var(--page-editor-control-bg);
}

.page-editor-widget-picker .emoji-picker-insert {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--page-editor-text);
  box-shadow: none;
  gap: 8px;
  align-items: flex-start;
}

.page-editor-widget-picker .emoji-picker-insert:hover {
  background: transparent;
  color: #0f1b2b;
}

.page-editor-widget-picker .emoji-picker-token {
  display: inline-block;
  width: fit-content;
  margin-bottom: 4px;
  padding: 2px 4px;
  color: var(--page-editor-text);
  background-color: var(--page-editor-code-bg);
  border: 1px solid #bec9d5;
}

.page-editor-widget-picker .emoji-picker-help,
.page-editor-widget-picker .emoji-picker-empty {
  color: var(--page-editor-muted);
  font-size: 12px;
  line-height: 1.3;
}

.page-editor-widget-picker .widget-picker-card-description {
  -webkit-line-clamp: 3;
}

.page-editor-widget-picker .message {
  margin: 8px 0;
  border-color: var(--page-editor-control-border);
  background-color: #f7f9fc;
  color: var(--page-editor-text);
}

.page-editor-widget-picker .message.success {
  border-color: #6f9f86;
  background-color: #e4f3ea;
  color: #184029;
}

.page-editor-widget-picker .message.error {
  border-color: #bf6a6a;
  background-color: #ffe2df;
  color: #641212;
}

.page-editor-accordion {
  margin: 10px 0;
  border: 1px solid #b5bec9;
  background: #f9fbfd;
}

.page-editor-accordion-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  cursor: pointer;
  list-style: none;
  font-weight: bold;
  color: var(--page-editor-text);
  background: #eef3f8;
}

.page-editor-accordion-summary::-webkit-details-marker {
  display: none;
}

.page-editor-accordion-summary::after {
  content: "+";
  flex: 0 0 auto;
  min-width: 1.5em;
  text-align: center;
  color: var(--page-editor-muted);
}

.page-editor-accordion[open] > .page-editor-accordion-summary::after {
  content: "-";
}

.page-editor-accordion-summary:hover {
  background: #e5edf6;
}

.page-editor-accordion-summary-meta {
  margin: 0;
  color: var(--page-editor-muted);
  font-size: 12px;
  font-weight: normal;
}

.page-editor-accordion-panel {
  display: grid;
  gap: 10px;
  padding: 10px;
  border-top: 1px solid #cbd6e0;
}

.page-editor-accordion-panel > :first-child {
  margin-top: 0;
}

.page-editor-accordion-panel > :last-child {
  margin-bottom: 0;
}

.page-editor-rule-builder {
  display: grid;
  gap: 8px;
}

.page-editor-rule-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 6px;
  align-items: start;
}

.page-editor-rule-row input,
.page-editor-rule-row select {
  min-width: 0;
}

@media (max-width: 720px) {
  .page-editor-rule-row {
    grid-template-columns: 1fr;
  }
}

.page-editor-object-token-list {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.page-editor-object-token-button {
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--page-editor-control-border);
  background: #ffffff;
  color: var(--page-editor-text);
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.page-editor-object-token-button:hover {
  background: #eef4fa;
  color: #0f1b2b;
}

.page-editor-object-token-button code {
  color: var(--page-editor-muted);
  font-size: 11px;
}

.custom-page-object-placeholder {
  display: inline-block;
  margin: 2px 4px 2px 0;
  padding: 2px 6px;
  border: 1px solid #bfc9d6;
  background: #f3f6fa;
  color: #5b6a7d;
  font-size: 11px;
  line-height: 1.4;
}

.custom-page-object-placeholder-image,
.custom-page-object-placeholder-file {
  background: #edf3f8;
}

.custom-page-object-placeholder-page-link,
.custom-page-object-placeholder-tags {
  background: #f2f5ea;
}

.custom-page-object-preview-image {
  display: block;
  max-width: min(100%, 320px);
  max-height: 260px;
  border: 1px solid #bfc9d6;
  background: #f3f6fa;
  padding: 6px;
  object-fit: contain;
}

.custom-page-object-preview-file {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
}

.custom-page-object-empty-value,
.object-record-empty-value {
  color: var(--page-muted, #5b6a7d);
  font-style: italic;
}

.custom-page-object-tag,
.object-record-tag {
  display: inline-block;
  margin: 2px 6px 2px 0;
  padding: 2px 6px;
  border: 1px solid currentColor;
}

.page-editor-widget-picker .widget-picker-action {
  min-height: 22px;
  padding: 2px 6px;
  border-color: var(--page-editor-control-border);
  background-color: #ffffff;
  color: var(--page-editor-text);
}

.page-editor-widget-picker .widget-picker-action:hover {
  background-color: #eef4fa;
  color: #0f1b2b;
}

.page-editor-widget-picker .widget-picker-action-secondary {
  background-color: #f4f7fb;
}

.page-editor-widget-picker .widget-picker-instance-row {
  padding-top: 5px;
}

.page-editor-widget-settings-window {
  width: min(420px, calc(100vw - 48px));
  right: 36px;
  top: 296px;
}

.page-editor-widget-settings-window .widget-settings-grid {
  gap: 10px;
}

.page-editor-widget-settings-window .widget-settings-multiselect {
  border-color: var(--page-editor-control-border);
  background-color: #ffffff;
}

.page-editor-widget-settings-window .widget-settings-choice-empty {
  color: var(--page-editor-muted);
}

.page-editor-widget-settings-window .widget-settings-help,
.page-editor-widget-settings-window .widget-settings-empty {
  color: var(--page-editor-muted);
}

.page-editor-widget-settings-window .widget-settings-checkbox {
  color: var(--page-editor-text);
}

.custom-page-widget-preview-shell {
  position: relative;
  margin: 8px 0;
}

.custom-page-widget-preview-body {
  position: relative;
}

.custom-page-widget-preview-shell.is-empty-preview .custom-page-widget-preview-body {
  min-height: 72px;
}

.custom-page-widget-preview-placeholder {
  display: grid;
  gap: 7px;
  min-height: 72px;
  align-content: center;
  padding: 10px 12px;
  border: 1px dashed rgba(85, 100, 118, 0.45);
  background: rgba(247, 249, 252, 0.92);
  color: var(--page-editor-text);
}

.custom-page-widget-preview-placeholder strong,
.custom-page-widget-preview-placeholder code {
  display: block;
}

.custom-page-widget-preview-placeholder code {
  font-size: 12px;
  word-break: break-word;
}

.custom-page-widget-preview-placeholder p {
  margin: 0;
  color: #4a5a6f;
  font-size: 12px;
}

body.page-editor-is-editing .custom-page-widget-preview-shell[data-widget-configurable="1"] {
  cursor: pointer;
}

body.page-editor-is-editing .custom-page-widget-preview-shell[data-widget-configurable="1"] .custom-page-widget-preview-body {
  transition: outline-color 120ms ease, outline-offset 120ms ease, box-shadow 120ms ease;
}

body.page-editor-is-editing .custom-page-widget-preview-shell[data-widget-configurable="1"]:hover .custom-page-widget-preview-body {
  outline: 1px dashed rgba(22, 34, 53, 0.4);
  outline-offset: 4px;
  box-shadow: inset 0 0 0 1px rgba(255, 243, 191, 0.45);
}

.page-editor-launcher {
  border: 1px solid rgba(110, 125, 145, 0.84);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
  color: #122034;
  box-shadow: none;
}

.page-editor-launcher.is-save-button {
  border-color: rgba(37, 116, 72, 0.84);
  background: rgba(221, 244, 230, 0.84);
  color: #153b26;
}

.page-editor-launcher.is-save-button.is-dirty {
  border-color: rgba(168, 124, 26, 0.88);
  background: rgba(255, 242, 205, 0.9);
  color: #553d00;
}

.page-editor-launcher:hover {
  background: rgba(238, 244, 250, 0.95);
  color: #0f1b2b;
}

.record-admin-link-widget-row {
  margin: 0;
}

.record-admin-link-button {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid currentColor;
  text-decoration: none;
}

.record-lookup-widget-shell {
  display: grid;
  gap: 8px;
  position: relative;
}

.record-lookup-widget-head {
  font-size: 13px;
  color: inherit;
}

.record-lookup-widget-box {
  display: grid;
  gap: 6px;
  position: relative;
}

.record-lookup-widget-box input[type="search"] {
  width: 100%;
}

.record-lookup-widget-box select {
  width: 100%;
  min-height: 30px;
}

.record-lookup-widget-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.record-lookup-widget-status {
  margin: 0;
  font-size: 13px;
  color: inherit;
  opacity: 0.78;
}

.record-search-range-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.record-search-result-image {
  display: block;
  width: 72px;
  max-width: 100%;
  height: 72px;
  object-fit: cover;
  border: 1px solid currentColor;
}

.record-search-tag {
  display: inline-block;
  margin: 2px 6px 2px 0;
  padding: 2px 6px;
  border: 1px solid currentColor;
}

.record-template-list-action {
  margin-top: 0.75rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

@media (max-width: 760px) {
  .custom-page-section-row-halves {
    grid-template-columns: 1fr;
  }

  body {
    padding-bottom: 28px;
  }

  .nav-container {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    justify-content: flex-start;
  }

  header,
  main {
    margin-left: 14px;
    margin-right: 14px;
  }

  main {
    padding: 18px;
  }

  .guestbook-entry-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .emoji-manager-body > header {
    flex-direction: column;
  }

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

  .emoji-picker-card {
    grid-template-columns: 1fr;
  }

  .page-editor-launcher {
    right: 12px;
    bottom: 12px;
  }

  .page-editor-field-grid {
    grid-template-columns: 1fr;
  }

  .page-editor-ribbon-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-editor-toolbar-window,
  .page-editor-ribbon-window,
  .page-editor-panel-window,
  .page-editor-layout-window,
  .page-editor-advanced-window,
  .page-editor-style-advanced-window,
  .page-editor-section-window,
  .page-editor-widget-settings-window {
    left: 12px;
    right: 12px;
    width: auto;
  }

  .page-editor-section-window {
    top: 280px;
    max-height: calc(100vh - 292px);
  }

  .page-editor-stylebar-head {
    grid-template-columns: 1fr;
  }
}
