#essc-editor-toolbar {
  position: fixed;
  z-index: 1000;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  border: 1px solid #9ecaec;
  border-radius: 14px;
  background: #fff;
  color: #172033;
  box-shadow: 0 12px 32px #17203330;
  font:
    600 0.9rem/1.3 system-ui,
    sans-serif;
}
#essc-editor-toolbar strong {
  color: #303d99;
}
#essc-editor-toolbar .essc-editor-hint {
  font-weight: 400;
  color: #5862ad;
}
#essc-editor-status {
  color: #303d99;
  margin-left: auto;
}
#essc-editor-toolbar button,
#essc-page-editor-controls button {
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  background: #303d99;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
#essc-editor-toolbar button:hover,
#essc-page-editor-controls button:hover {
  background: #2e429b;
}
#essc-editor-toolbar #essc-editor-reset-page {
  background: #fff;
  color: #303d99;
  border: 1px solid #303d99;
}
#essc-content-dialog {
  width: min(34rem, calc(100% - 2rem));
  border: 0;
  border-radius: 18px;
  padding: 0;
  box-shadow: 0 20px 60px #17203355;
  color: #172033;
}
#essc-content-dialog::backdrop {
  background: #17203388;
}
#essc-content-dialog form {
  display: grid;
  gap: 0.55rem;
  padding: 1.35rem;
}
#essc-content-dialog h2 {
  margin: 0.1rem 0 0.4rem;
  color: #303d99;
}
#essc-content-dialog label {
  font-weight: 700;
  color: #303d99;
}
#essc-content-dialog textarea,
#essc-content-dialog select,
#essc-content-dialog input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #bcbdc0;
  border-radius: 10px;
  padding: 0.7rem;
  font: inherit;
  color: #172033;
  background: #fff;
}
#essc-content-dialog select {
  border-color: #9ecaec;
}
#essc-editor-image-label[hidden],
#essc-editor-alt-label[hidden] {
  display: none;
}
.essc-editor-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.essc-editor-actions span {
  flex: 1;
}
.essc-editor-actions button {
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  background: #303d99;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.essc-editor-actions #essc-editor-reset,
.essc-editor-actions #essc-editor-cancel {
  background: #fff;
  color: #303d99;
  border: 1px solid #303d99;
}
.essc-editable,
.essc-editable-image {
  outline: 2px dashed #9ecaec;
  outline-offset: 4px;
  cursor: pointer;
}
.essc-editable:hover,
.essc-editable-image:hover,
.essc-editable:focus,
.essc-editable-image:focus {
  outline-color: #ed1f24;
}
.essc-editable-image-host {
  position: relative;
  outline: 2px dashed #9ecaec;
  outline-offset: -4px;
}
.essc-image-edit {
  position: absolute;
  z-index: 2;
  right: 0.75rem;
  top: 0.75rem;
  border: 0;
  border-radius: 999px;
  padding: 0.5rem 0.75rem;
  background: #303d99;
  color: #fff;
  font:
    700 0.8rem system-ui,
    sans-serif;
  cursor: pointer;
}
.essc-image-edit:hover {
  background: #2e429b;
}
#essc-page-editor-controls {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #9ecaec;
  border-radius: 14px;
  background: #f5f8fc;
}
#essc-page-editor-controls h3 {
  margin: 0.1rem 0;
  color: #303d99;
}
#essc-page-editor-controls p {
  margin: 0.35rem 0 0.75rem;
  color: #5862ad;
}
.essc-page-editor-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.essc-page-editor-row select {
  min-width: 12rem;
  padding: 0.55rem;
  border: 1px solid #bcbdc0;
  border-radius: 9px;
  background: #fff;
  color: #172033;
}
@media (max-width: 640px) {
  #essc-editor-toolbar {
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0.5rem;
    gap: 0.45rem;
    font-size: 0.8rem;
  }
  #essc-editor-toolbar .essc-editor-hint {
    display: none;
  }
  #essc-editor-status {
    margin-left: 0;
  }
  .essc-editor-actions {
    flex-wrap: wrap;
  }
  .essc-editor-actions span {
    display: none;
  }
}
#essc-editor-route-select {
  border: 1px solid #9ecaec;
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  background: #fff;
  color: #303d99;
  font:
    600 0.85rem system-ui,
    sans-serif;
}
.essc-editor-route-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
#essc-content-dialog .essc-image-chooser {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  max-height: 18rem;
  overflow: auto;
  padding: 0.2rem;
}
#essc-content-dialog .essc-image-choice {
  display: grid;
  gap: 0.2rem;
  padding: 0.25rem;
  border: 2px solid transparent;
  border-radius: 9px;
  background: #f5f8fc;
  color: #172033;
  cursor: pointer;
  font-size: 0.68rem;
  text-align: left;
}
#essc-content-dialog .essc-image-choice:hover,
#essc-content-dialog .essc-image-choice[aria-pressed="true"] {
  border-color: #303d99;
  background: #9ecaec55;
}
#essc-content-dialog .essc-image-choice img {
  width: 100%;
  aspect-ratio: 1.4;
  object-fit: cover;
  border-radius: 6px;
}
#essc-content-dialog .essc-image-choice span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
