.panel {
  background: var(--parchment);
  color: var(--ink);
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: 0 22px 50px var(--shadow);
}

.login-panel {
  max-width: 420px;
  margin: 30px auto;
  text-align: center;
}
.login-panel h2 { color: var(--leather); margin-top: 0; }

.muted { color: #8a6f48; }
.error { color: #9b2c2c; font-weight: 600; margin: 6px 0 0; }

.editor { max-width: 1180px; margin: 0 auto; }
.editor-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}
.editor-bar .spacer { flex: 1; }
/* the bar sits on the dark page background, so ghost buttons need light text */
.editor-bar .btn.ghost {
  color: var(--gold-soft);
  border-color: var(--gold);
}
.editor-bar .btn.ghost:hover {
  background: rgba(227, 200, 120, .12);
  filter: none;
}

.editor-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 22px;
  align-items: start;
}
@media (max-width: 880px) { .editor-grid { grid-template-columns: 1fr; } }

form label {
  display: block;
  margin: 12px 0 0;
  font-size: .9rem;
  color: var(--leather);
  font-weight: 600;
}
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

input, textarea {
  width: 100%;
  margin-top: 5px;
  padding: 9px 11px;
  border: 1px solid #c8b487;
  border-radius: 6px;
  background: #fffaf0;
  color: var(--ink);
  font-family: inherit;
  font-size: .95rem;
}
input:focus, textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
textarea { resize: vertical; }

fieldset {
  margin: 16px 0 0;
  border: 1px solid #d8c49a;
  border-radius: 8px;
  padding: 4px 14px 14px;
}
legend { color: var(--leather); font-weight: 700; padding: 0 6px; }

.check {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  cursor: pointer;
}
.check input {
  width: auto;
  margin: 0;
  accent-color: var(--leather);
}

.image-input { margin-top: 6px; display: grid; gap: 8px; }
.image-input.disabled {
  opacity: .45;
  pointer-events: none;
  filter: grayscale(.4);
}
.image-input .preview {
  width: 110px; height: 150px; object-fit: cover;
  border-radius: 6px; border: 1px solid #c8b487;
}

.row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; align-items: center; }

.entry-list { list-style: none; margin: 8px 0 0; padding: 0; max-height: 70vh; overflow: auto; }
.entry-list li {
  display: flex; gap: 12px; align-items: center;
  padding: 10px; border: 1px solid #ddcaa0; border-radius: 8px;
  margin-bottom: 10px; background: #fffaf0;
}
.entry-list img {
  width: 46px; height: 60px; object-fit: cover; border-radius: 4px; flex: none;
}
.entry-list .meta { flex: 1; min-width: 0; }
.entry-list .meta strong { display: block; }
.entry-list .meta small { color: #8a6f48; }
.entry-list .acts { display: flex; gap: 6px; flex: none; }
.entry-list .acts button {
  border: 1px solid var(--leather); background: transparent; color: var(--leather);
  border-radius: 6px; padding: 5px 9px; cursor: pointer; font-family: inherit; font-size: .82rem;
}
.entry-list .acts button.del { color: #9b2c2c; border-color: #9b2c2c; }
.entry-list .acts button:hover { filter: brightness(1.1); background: rgba(0,0,0,.04); }

dialog {
  border: 1px solid var(--gold);
  border-radius: 12px;
  background: var(--parchment);
  color: var(--ink);
  padding: 22px 24px;
  max-width: 360px;
}
dialog::backdrop { background: rgba(20,12,6,.6); }
dialog h2 { margin-top: 0; color: var(--leather); }
