body.cms-login-page {
  font: 16px/1.5 system-ui, sans-serif;
  color: #332826;
  background: #fff;
  display: grid;
  min-height: 100vh;
  box-sizing: border-box;
  place-items: center;
  margin: 0;
  padding: 24px;
}

.cms-login-page main {
  width: min(100%, 340px);
}

.cms-login-page h1 { margin: 0 0 24px; font-size: 1.5rem; }
.cms-login-page .back { display: inline-block; margin-top: 18px; color: #a33935; }

.cms-login-dialog {
  position: fixed;
  inset: 0;
  width: min(520px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  margin: auto;
  padding: clamp(32px, 8vw, 44px) clamp(24px, 8vw, 52px);
  padding-bottom: clamp(44px, 10vw, 60px);
  overflow: auto;
  border: 1px solid #efc5b5;
  border-radius: 12px;
  background: #fff;
  color: #332826;
  box-shadow: 0 16px 48px rgba(35, 20, 18, 0.22);
}

.cms-login-dialog::backdrop { background: rgba(35, 20, 18, 0.55); }
.cms-login-dialog h2 { margin: 0 44px 20px 0; font-size: 1.5rem; }
.cms-login-body, .cms-login-error { font-size: 1rem; }
.cms-login-error { margin: 0; color: #a33935; }
.cms-login-error:not(:empty) { margin-bottom: 12px; }
.cms-login-form { display: grid; gap: 8px; }
.cms-login-form label { font-weight: 600; }

.cms-login-form input:not([type="hidden"]),
.cms-login-submit {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #a9958f;
  border-radius: 6px;
  font: inherit;
}

.cms-login-form > input:not([type="hidden"]) { margin-bottom: 6px; }
.cms-login-submit {
  margin-top: 8px;
  border-color: #ab382c;
  background: #ab382c;
  color: #fff;
  cursor: pointer;
}

.cms-login-dialog .cms-login-submit { margin-top: 16px; }

.cms-password-field { position: relative; }
.cms-password-field input:not([type="hidden"]) { padding-right: 48px; }
.cms-password-toggle,
.cms-login-close {
  position: absolute;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #8d372d;
  cursor: pointer;
}

.cms-password-toggle[hidden] { display: none; }
.cms-password-toggle { inset: 0 0 auto auto; }
.cms-login-close { top: 12px; right: 12px; font: 28px/1 system-ui, sans-serif; }
.cms-password-toggle:hover, .cms-login-close:hover { background: #fff0ea; }
.cms-password-toggle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cms-password-field input[type="password"] ~ .cms-password-toggle .cms-password-slash { display: none; }
.cms-password-field input::-ms-reveal { display: none; }
.cms-login-form :is(input, button):focus-visible,
.cms-login-close:focus-visible { outline: 2px solid #a33935; outline-offset: 2px; }
.cms-login-submit:disabled, .cms-login-close:disabled { opacity: 0.6; cursor: wait; }
.content-editor { margin: 0; background: #faf7f5; color: #332826; font: 16px/1.5 system-ui, sans-serif; }
.content-editor main { max-width: 820px; margin: auto; padding: 28px 16px 56px; }
.content-editor nav, .editor-actions, .editor-actions form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.content-editor a { color: #90372c; }
.content-editor nav a, .content-editor button { padding: 8px 12px; border: 1px solid #d9c3bc; border-radius: 6px; background: white; color: #75372c; }
.content-editor nav [aria-current], .content-editor button[name=action][value=publish] { background: #90372c; color: white; }
.content-editor article, .content-editor main > details, .content-editor section { background: white; padding: 16px; margin: 12px 0; border: 1px solid #ead8d1; border-radius: 8px; }
.content-editor summary, .content-editor button { cursor: pointer; }
.content-editor form { margin: 10px 0; }
.content-editor label { display: grid; gap: 4px; margin: 12px 0; font-weight: 600; }
.content-editor textarea, .content-editor select { width: 100%; box-sizing: border-box; padding: 8px; font: inherit; }
.content-editor [role=status] { border-left: 3px solid #ab382c; padding: 8px 12px; }
