.admin-header { min-height: 4.5rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.admin-actions, .editor-heading, .publish-bar { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.admin-main { padding-block: 2.6rem 4rem; max-width: 62rem; }
.admin-main h1 { font-size: clamp(2.35rem, 6vw, 4.2rem); line-height: 1.1; letter-spacing: -.065em; overflow-wrap: anywhere; }
.admin-main h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); letter-spacing: -.04em; }
#admin-status, .admin-error { margin-top: .7rem; }
.admin-error { color: #ffc3d5; font-weight: 650; }
[data-theme='light'] .admin-error { color: #8f1742; }
.admin-error:empty, #admin-status:empty { display: none; }
.admin-panel { margin-top: 1.15rem; padding: clamp(1rem, 3vw, 1.5rem); background: var(--card); border: 1px solid var(--line); border-radius: .8rem; }
.login-form { display: grid; gap: .85rem; max-width: 27rem; }
.login-form .button { justify-self: start; }
.editor-fields, .gallery-fields { min-inline-size: 0; padding: 0; margin: 0; border: 0; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem 1rem; }
.admin-panel h2 + .field-grid { margin-top: 1rem; }
.full-field { grid-column: 1 / -1; }
.field-hint { color: var(--muted); font-size: .875rem; }
.admin-panel label { display: grid; align-content: start; gap: .35rem; font-weight: 620; }
.admin-panel input, .admin-panel textarea, .admin-panel select { width: 100%; min-height: 2.8rem; border: 1px solid var(--control-line); border-radius: .45rem; color: var(--text); background: var(--bg); font: inherit; font-weight: 400; padding: .5rem .7rem; }
.admin-panel textarea { resize: vertical; }
.admin-panel input::placeholder { color: var(--muted); opacity: 1; }
.admin-panel label:has([type='checkbox']) { display: flex; align-items: center; gap: .55rem; }
.admin-panel input[type='checkbox'] { width: 1.1rem; min-height: 1.1rem; accent-color: var(--accent); }
.editor-heading, .publish-bar { justify-content: space-between; }
.entry-list { display: grid; gap: .6rem; margin-top: .9rem; }
.editor-entry { background: var(--surface); border: 1px solid var(--line); border-radius: .55rem; min-width: 0; }
.editor-entry summary { padding: .75rem 1rem; min-height: 2.75rem; cursor: pointer; font-weight: 650; overflow-wrap: anywhere; }
.entry-body { padding: .3rem 1rem 1rem; }
.entry-body > .admin-actions { margin-top: .85rem; }
.gallery-fields { margin-top: 1.15rem; }
.gallery-fields legend { font-weight: 700; }
.gallery-fields .button { margin-top: .65rem; }
.image-row { margin-top: .75rem; padding: .65rem; border: 1px solid var(--line); border-radius: .5rem; }
.image-row .button { justify-self: start; margin-top: 0; }
.publish-bar { margin-top: 1.1rem; padding: .85rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: .65rem; }
.publish-bar p { color: var(--muted); }
.publish-bar #publish-feedback { flex-basis: 100%; font-weight: 650; }
#publish-feedback:empty { display: none; }
.publish-bar #publish-feedback.admin-error { color: #ffc3d5; }
[data-theme='light'] .publish-bar #publish-feedback.admin-error { color: #8f1742; }
button:disabled { opacity: .65; cursor: wait; }

@media (max-width: 620px) {
  .field-grid { grid-template-columns: 1fr; }
  .admin-header .admin-actions { gap: .35rem; }
  .admin-header .button { padding-inline: .6rem; }
}

.publish-bar { position: sticky; bottom: .75rem; z-index: 5; background: var(--glass-strong); -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%); box-shadow: 0 .8rem 2rem -1rem #0009; }
.admin-panel { background: var(--glass); border-color: var(--glass-edge); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.editor-entry summary { display: flex; align-items: center; gap: .65rem; }
.entry-icon { flex: 0 0 1.9rem; height: 1.9rem; }
.entry-icon img { width: 1.2rem; height: 1.2rem; }
.entry-icon .skill-mask, .entry-icon .skill-mark[data-icon] { width: 1.1rem; height: 1.1rem; }
.file-button { position: relative; cursor: pointer; }
.file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-button:focus-within { outline: 2px solid var(--focus); outline-offset: 4px; }
.backup-actions { margin-top: .8rem; }
#github-dialog .admin-actions { margin-top: 1rem; justify-content: end; }
#github-dialog h2 { margin: 0; font-size: 1.6rem; }
.github-search { display: flex; gap: .6rem; align-items: end; margin-top: 1rem; }
.github-search label { flex: 1; display: grid; gap: .35rem; font-weight: 620; }
.github-search input { width: 100%; min-height: 2.8rem; border: 1px solid var(--control-line); border-radius: .45rem; color: var(--text); background: var(--bg); font: inherit; padding: .5rem .7rem; }
#github-status { margin-top: .7rem; }
#github-status:empty { display: none; }
.github-list { display: grid; gap: .4rem; max-height: 45vh; overflow: auto; margin-top: .6rem; }
.github-list:empty { display: none; }
.github-repo { display: flex; gap: .7rem; align-items: flex-start; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: .5rem; background: var(--surface); cursor: pointer; }
.github-repo:has(input:disabled) { opacity: .6; cursor: default; }
.github-repo input { margin-top: .3rem; accent-color: var(--accent); }
.github-repo span { display: grid; min-width: 0; }
.github-repo small { color: var(--muted); overflow-wrap: anywhere; }
#backup-heading + .field-hint { margin-top: .5rem; }
.upload-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; font-weight: 400; }
.upload-button { min-height: 2.3rem; padding: .3rem .75rem; font-size: .85rem; }
.upload-status { color: var(--muted); font-size: .85rem; }
.upload-status:empty { display: none; }
.drag-handle { display: grid; place-items: center; flex: 0 0 1.9rem; width: 1.9rem; height: 1.9rem; margin: -.2rem 0; padding: 0; border: 1px solid transparent; border-radius: .4rem; background: transparent; color: var(--muted); cursor: grab; touch-action: none; }
.drag-handle::before { content: ''; width: .55rem; height: .95rem; background: radial-gradient(circle, currentColor 1.2px, transparent 1.6px) 0 0 / .275rem .32rem; }
.drag-handle:hover, .drag-handle:focus-visible { color: var(--accent); border-color: var(--glass-edge); background: var(--accent-soft); }
.drag-handle:active { cursor: grabbing; }
.editor-entry.is-dragging { opacity: .45; outline: 2px dashed var(--accent); outline-offset: 2px; }
.editor-entry { transition: transform .15s ease; }
