.admin-main { max-width: 1000px; margin: 0 auto; padding: 0 16px 48px; }
button.pill-nav { color: inherit; font: 800 17px Nunito, sans-serif; cursor: pointer; }
.admin-card { background: #fff; color: var(--ink); border: 4px solid var(--edge); border-radius: 24px; box-shadow: 0 6px 0 var(--edge); padding: 22px; }
.login { display: grid; gap: 14px; max-width: 400px; margin: 48px auto 0; }
.login h1 { font-size: 34px; }
.login[hidden], #panel[hidden] { display: none; }
.admin-tabs { flex-wrap: wrap; padding: 22px 0 18px; }
.admin-tabs button { padding: 6px 18px; background: #fff; color: inherit; border: 4px solid var(--edge); border-radius: 999px; font: 600 17px Fredoka, sans-serif; cursor: pointer; }
.admin-tabs button:hover { background: var(--banana); }
.admin-tabs button[aria-current] { background: var(--hot); box-shadow: 0 4px 0 var(--edge); }
.section-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.section-top h2 { font-size: 32px; }
.section-top p { margin: 0; color: var(--soft); }
.admin-section button.btn { cursor: pointer; font-family: Fredoka, sans-serif; }
.admin-section .btn, .admin-actions .btn { padding: 8px 20px; font-size: 17px; cursor: pointer; color: var(--ink); }
.rows { display: grid; gap: 10px; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px; background: #fff; border: 4px solid var(--edge); border-radius: 18px; }
.row.off { border-style: dashed; opacity: .65; }
.row-art { display: grid; place-items: center; width: 52px; height: 52px; flex: none; overflow: hidden; background: var(--banana); border-radius: 12px; font: 700 18px Fredoka, sans-serif; }
.row-art img { width: 100%; height: 100%; object-fit: cover; }
.row-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.row-text b { display: block; font: 600 18px/1.15 Fredoka, sans-serif; }
.row-text small { display: block; color: var(--soft); font-size: 14px; }
.row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.row-actions button { padding: 3px 11px; background: #fff; color: inherit; border: 3px solid var(--edge); border-radius: 999px; font: 700 14px Nunito, sans-serif; cursor: pointer; }
.row-actions button:hover:not(:disabled) { background: var(--banana); }
.row-actions button:disabled { opacity: .3; cursor: default; }
.row-actions .del:hover { background: #ffb3a3; }
.empty { padding: 24px; text-align: center; color: var(--soft); }
dialog.admin-card { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; }
dialog::backdrop { background: #2a1f14b3; }
#editorForm h2 { margin-bottom: 12px; font-size: 28px; }
.admin-main label, dialog label { display: block; margin-bottom: 12px; font-weight: 800; }
.admin-main label small, dialog label small { display: block; color: var(--soft); font-weight: 700; }
.admin-main input:not([type=checkbox]), dialog input:not([type=checkbox]), dialog textarea, .admin-main textarea { display: block; width: 100%; margin-top: 4px; padding: 9px 12px; background: var(--cream); color: var(--ink); border: 3px solid var(--edge); border-radius: 12px; font: 700 16px Nunito, sans-serif; }
dialog textarea, .admin-main textarea { min-height: 96px; resize: vertical; }
.check { display: flex !important; align-items: center; gap: 8px; }
.check input { width: 20px; height: 20px; accent-color: var(--hot); }
.hint { min-height: 20px; margin: 0 0 8px; color: #a84200; font-size: 14px; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.toast { position: fixed; left: 50%; bottom: 20px; z-index: 50; padding: 10px 20px; background: var(--ink); color: #fff; border-radius: 999px; opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity .15s, transform .15s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: #b3261e; }
@media (max-width: 640px) {
  .row { flex-wrap: wrap; }
  .row-text { flex-basis: calc(100% - 70px); }
  .row-actions { width: 100%; }
}
