:root {
  --cms-black: #111513;
  --cms-white: #fffdf6;
  --cms-accent: #7cff7c;
  --cms-warn: #ffcf5a;
  --cms-border: rgba(17, 21, 19, .16);
}

/* Site-specific controls added to the supplied visual CMS template. */
.cms-toolbar{max-width:calc(100vw - 32px);border-radius:14px;flex-wrap:wrap;justify-content:center;font-size:13px}
.cms-toolbar a{color:var(--cms-white);background:#ffffff1f;padding:10px 14px;border-radius:999px;white-space:nowrap}
.cms-toolbar button{font-weight:600;font-size:13px;white-space:nowrap}
.cms-status{font-size:11px;opacity:.7;white-space:nowrap}
.cms-panel{max-height:calc(100dvh - 145px);overflow:auto;border-radius:12px;top:18px}
.cms-panel h2{font-size:19px;margin:0 32px 16px 0;font-weight:600;overflow-wrap:anywhere}
.cms-panel .cms-panel-close{position:absolute;right:12px;top:7px;border:0;background:transparent;color:white;font-size:26px;padding:4px 9px}
.cms-panel select{width:100%;border-radius:6px;padding:10px;background:#fff;color:#222;font-size:13px;border:0;min-width:0}
.cms-panel .cms-field-controls textarea,.cms-panel .cms-field-controls input{border-radius:6px;font-size:14px;line-height:1.5}
.cms-panel .cms-checkbox{display:flex;align-items:center;gap:10px;font-size:14px;padding:15px 0}
.cms-panel .cms-checkbox input{width:20px;height:20px;accent-color:#7cff7c}
.cms-panel .cms-secondary{margin-top:14px;border-radius:6px;font-weight:500}
.cms-panel .cms-upload-label input{font-size:12px;padding:10px 0;border:0}
.cms-panel .cms-upload-label{font-size:14px;margin-top:16px}
.cms-panel .cms-field-help{margin:12px 0;line-height:1.5}
.cms-history-item{grid-template-columns:1fr;border-radius:7px}
.cms-history-item p{margin:0}
.cms-login{width:min(470px,calc(100% - 40px));margin:10vh auto;padding:35px;border:1px solid var(--line);border-radius:8px;background:#fff9}
.cms-login h1{font-size:30px;font-weight:600;margin:20px 0 24px}
.cms-login label{display:flex;flex-direction:column;gap:7px;margin:17px 0;font-size:15px}
.cms-login input{height:49px;width:100%;padding:11px;border:1px solid #ccbfaf;border-radius:5px;min-width:0}
.cms-login .btn{width:100%;margin-top:12px;font-size:17px}
.cms-login>a{display:inline-block;font-size:14px;margin-top:22px;color:var(--gold)}
#cms-login-error{color:#9e3725;font-size:14px;line-height:1.5}
body.cms-editing{padding-bottom:100px}
body.cms-editing [data-cms-number-key],body.cms-editing [data-cms-visible-key]{outline:1px dashed #5e9c6380;outline-offset:4px}
body.cms-editing [contenteditable="plaintext-only"]{white-space:pre-line}
@media(max-width:720px){.cms-toolbar{max-width:none;gap:6px;padding:9px}.cms-toolbar strong{display:none}.cms-toolbar button,.cms-toolbar a{font-size:11px;padding:8px 10px}.cms-status{width:100%;text-align:center;font-size:10px}.cms-panel{max-height:calc(100dvh - 175px)}.cms-login{padding:25px}.cms-login h1{font-size:26px}}

.cms-toolbar,
.cms-panel,
.cms-toast {
  font-family: Manrope, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.cms-toolbar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
  padding: 10px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(17, 21, 19, .88);
  box-shadow: 0 20px 70px rgba(0,0,0,.28);
  color: var(--cms-white);
  backdrop-filter: blur(18px);
}

.cms-toolbar strong {
  padding: 0 8px;
  font-size: 13px;
  white-space: nowrap;
}

.cms-toolbar button,
.cms-panel button,
.cms-panel input,
.cms-panel textarea {
  font: inherit;
}

.cms-toolbar button,
.cms-panel button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
}

.cms-toolbar button {
  padding: 10px 14px;
  background: rgba(255,255,255,.12);
  color: var(--cms-white);
}

.cms-toolbar button:hover {
  background: rgba(255,255,255,.2);
}

.cms-toolbar .cms-save {
  background: var(--cms-accent);
  color: var(--cms-black);
}

.cms-toolbar .cms-save[disabled] {
  opacity: .55;
  cursor: wait;
}

.cms-panel {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 99999;
  width: min(360px, calc(100vw - 36px));
  padding: 16px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 22px;
  background: rgba(17, 21, 19, .9);
  color: var(--cms-white);
  box-shadow: 0 24px 80px rgba(0,0,0,.32);
  backdrop-filter: blur(18px);
}

.cms-panel[hidden] {
  display: none;
}

.cms-panel h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.cms-panel p {
  margin: 0 0 12px;
  color: rgba(255,255,255,.72);
  font-size: 12px;
  line-height: 1.45;
}

.cms-panel label {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  color: rgba(255,255,255,.72);
  font-size: 12px;
  font-weight: 800;
}

.cms-panel input,
.cms-panel textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px;
  background: rgba(255,255,255,.08);
  color: var(--cms-white);
  outline: none;
  padding: 10px 12px;
}

.cms-panel textarea {
  min-height: 94px;
  resize: vertical;
}

.cms-panel .cms-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.cms-history-fields {
  margin-top: 10px;
}

.cms-history-list {
  display: grid;
  gap: 8px;
  max-height: min(52vh, 460px);
  overflow: auto;
  padding-right: 2px;
}

.cms-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px;
  background: rgba(255,255,255,.07);
}

.cms-history-item strong {
  display: block;
  font-size: 13px;
  color: var(--cms-white);
}

.cms-history-item span,
.cms-history-empty {
  display: block;
  margin: 4px 0 0;
  color: rgba(255,255,255,.62);
  font-size: 11px;
  line-height: 1.35;
}

.cms-history-item button {
  padding: 8px 10px;
  font-size: 12px;
  background: rgba(255,255,255,.14);
  color: var(--cms-white);
}

.cms-history-item:first-child button {
  background: var(--cms-warn);
  color: var(--cms-black);
}

.cms-panel button {
  padding: 10px 12px;
  background: var(--cms-accent);
  color: var(--cms-black);
}

.cms-panel .cms-secondary {
  background: rgba(255,255,255,.12);
  color: var(--cms-white);
}

.cms-toast {
  position: fixed;
  left: 50%;
  top: 18px;
  z-index: 100000;
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--cms-black);
  color: var(--cms-white);
  box-shadow: 0 14px 60px rgba(0,0,0,.24);
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.cms-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(4px);
}

body.cms-editing [data-cms-text-key],
body.cms-editing [data-cms-image-key],
body.cms-editing [data-cms-link-key] {
  outline: 1.5px dashed rgba(124, 255, 124, .75);
  outline-offset: 4px;
}

body.cms-editing [data-cms-text-key]:hover,
body.cms-editing [data-cms-image-key]:hover,
body.cms-editing [data-cms-link-key]:hover,
body.cms-editing .cms-selected {
  outline: 3px solid var(--cms-accent) !important;
  outline-offset: 5px;
  cursor: text;
}

body.cms-editing [data-cms-image-key] {
  cursor: copy;
}

body.cms-editing [contenteditable="true"] {
  -webkit-user-modify: read-write-plaintext-only;
}

body.cms-editing [contenteditable="true"]:focus {
  outline: 3px solid var(--cms-warn) !important;
  outline-offset: 5px;
}

body.cms-editing a,
body.cms-editing button,
body.cms-editing .work-open {
  pointer-events: auto;
}

body.cms-editing .work-open {
  display: none;
}

body.cms-saving * {
  cursor: progress !important;
}

@media (max-width: 720px) {
  .cms-toolbar {
    left: 10px;
    right: 10px;
    bottom: 10px;
    transform: none;
    justify-content: space-between;
    border-radius: 20px;
    flex-wrap: wrap;
  }

  .cms-panel {
    top: 10px;
    right: 10px;
    width: calc(100vw - 20px);
  }
}
