.editor-login {
  width: min(92vw, 28rem);
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  border: 0;
  box-shadow: 0 1.5rem 5rem rgba(12, 13, 11, 0.28);
}

.editor-login::backdrop {
  background: rgba(12, 13, 11, 0.72);
  backdrop-filter: blur(8px);
}

.editor-login-form {
  display: grid;
  gap: 1rem;
  padding: clamp(1.5rem, 5vw, 2.5rem);
}

.editor-login-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
}

.editor-login h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 7vw, 3.5rem);
  font-weight: 400;
  line-height: 1;
}

.editor-login p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.7;
}

.editor-login label {
  margin-top: 0.4rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.editor-login input {
  width: 100%;
  padding: 0.85rem 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  outline: none;
}

.editor-login input:focus {
  border-bottom-width: 2px;
}

.editor-login-error {
  min-height: 1.4rem;
  color: var(--accent) !important;
}

.editor-login-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.editor-login-actions button,
.editor-bar button {
  padding: 0.72rem 0.9rem;
  border-radius: 999px;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.editor-login-actions button {
  border: 1px solid var(--line);
}

.editor-login-actions button[type="submit"] {
  color: var(--white);
  background: var(--ink);
  border-color: var(--ink);
}

.editor-bar {
  position: fixed;
  z-index: 80;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: calc(100vw - 2rem);
  padding: 0.45rem;
  color: var(--white);
  background: rgba(23, 24, 21, 0.96);
  border: 1px solid rgba(255, 253, 248, 0.2);
  border-radius: 999px;
  box-shadow: 0 0.8rem 2.5rem rgba(12, 13, 11, 0.28);
  backdrop-filter: blur(16px);
}

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

.editor-bar span {
  max-width: 22rem;
  padding: 0 0.65rem;
  overflow: hidden;
  font-size: 0.58rem;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-bar span[data-state="success"] {
  color: #b8e2c4;
}

.editor-bar span[data-state="error"] {
  color: #f3b7a9;
}

.editor-bar .editor-views {
  color: #e7dfbf;
  letter-spacing: 0.04em;
}

.editor-bar button[data-editor-save] {
  color: var(--ink);
  background: var(--white);
}

.editor-bar button[data-editor-exit] {
  color: var(--white);
  background: transparent;
  border: 1px solid rgba(255, 253, 248, 0.28);
}

.editor-bar button:disabled {
  cursor: wait;
  opacity: 0.6;
}

body.editor-mode [data-i18n][contenteditable="true"],
body.editor-mode [data-i18n][contenteditable="plaintext-only"] {
  outline: 1px dashed rgba(191, 75, 43, 0.7);
  outline-offset: 4px;
  cursor: text;
}

body.editor-mode [data-i18n][contenteditable="true"]:focus,
body.editor-mode [data-i18n][contenteditable="plaintext-only"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

body.editor-mode img[data-image-slot] {
  outline: 2px dashed var(--accent);
  outline-offset: -6px;
  cursor: pointer;
}

body.editor-mode .book {
  outline: 2px dashed var(--accent);
  outline-offset: 5px;
  cursor: pointer;
}

.editor-file-input {
  display: none;
}

@media (max-width: 580px) {
  .editor-bar {
    right: 0.65rem;
    bottom: 0.65rem;
    left: 0.65rem;
    flex-wrap: wrap;
    justify-content: space-between;
    border-radius: 1.2rem;
  }

  .editor-bar span {
    max-width: none;
    min-width: 0;
  }

  .editor-bar .editor-views {
    order: 2;
    width: 100%;
    padding: 0.2rem 0.65rem;
  }

  .editor-bar button {
    order: 1;
  }
}
