@font-face { font-family: 'Beth Ellen'; src: url('../assets/fonts/beth-ellen/BethEllen-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
:root { --paper: #f2f5d7; --olive: #879419; --text: #353c18; --muted: #60674b; --line: #cbd0a5; --surface: #fbfcec; --focus: #566313; --danger: #903f2c; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--text); background: var(--paper); font: 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
a { color: inherit; text-underline-offset: 4px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip-link { position: fixed; left: 16px; top: -100px; padding: 12px; background: var(--surface); z-index: 20; }
.skip-link:focus { top: 12px; }
.admin-header { min-height: 96px; padding: 22px clamp(20px, 4vw, 64px); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.signature { font: 25px/1.6 'Beth Ellen', cursive; color: var(--olive); text-decoration: none; }
.view-switch { display: flex; align-items: center; gap: 20px; font-size: 14px; }
.view-switch [aria-current] { border-bottom: 2px solid var(--olive); padding: 10px 0; font-weight: 650; }
.admin-main { max-width: 1320px; margin: 0 auto; padding: 42px clamp(20px, 4vw, 56px) 0; }
.page-heading { display: flex; justify-content: space-between; align-items: start; gap: 24px; }
h1 { font-size: clamp(30px, 4vw, 42px); letter-spacing: -.035em; line-height: 1.15; font-weight: 550; margin: 0 0 10px; }
h2 { font-size: 26px; line-height: 1.25; letter-spacing: -.025em; font-weight: 550; margin: 0 0 10px; }
h3 { margin: 0 0 12px; font-size: 18px; font-weight: 600; }
p { margin: 0 0 16px; }
.page-heading p, .hint, .section-description, .login-panel > p { color: var(--muted); }
.account { display: flex; align-items: center; gap: 16px; font-size: 14px; flex-wrap: wrap; justify-content: flex-end; }
.text-button { border: 0; padding: 6px 0; background: none; color: inherit; text-decoration: underline; text-underline-offset: 4px; min-height: 40px; }
.status { padding: 12px 16px; min-height: 48px; margin: 10px 0 24px; background: rgba(255,255,255,.3); border-left: 3px solid var(--olive); overflow-wrap: anywhere; }
.status[data-tone="error"] { border-color: var(--danger); color: #733323; background: #f7e9df; }
.status[data-tone="success"] { border-color: var(--focus); }
.login-panel { width: min(100%, 430px); margin: 56px auto 100px; }
label { display: block; font-size: 14px; font-weight: 600; margin: 0 0 7px; }
input:not([type="color"]), textarea, select { width: 100%; min-height: 46px; background: var(--surface); border: 1px solid #a7af7c; border-radius: 3px; color: var(--text); padding: 10px 12px; }
textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: #777e60; opacity: 1; }
input[type="file"] { padding: 8px; font-size: 14px; }
input[type="file"]::file-selector-button { background: var(--paper); border: 1px solid var(--line); border-radius: 2px; padding: 7px 10px; margin-right: 12px; color: var(--text); cursor: pointer; }
.login-panel input { margin-bottom: 20px; }
.primary, .secondary, .danger-button, .compact-button { min-height: 44px; padding: 10px 18px; border-radius: 3px; border: 1px solid var(--focus); font-weight: 600; line-height: 1.4; }
.primary { color: var(--surface); background: var(--focus); }
.primary:not(:disabled):hover { background: #414d0b; }
.secondary, .compact-button { background: transparent; color: var(--text); border-color: #a7af7c; }
.secondary:not(:disabled):hover, .compact-button:not(:disabled):hover { background: rgba(255,255,255,.45); }
.danger-button { color: var(--danger); border-color: #c79f8d; background: transparent; }
.danger-button:hover { background: #f7e9df; }
.compact-button { padding: 8px 12px; font-size: 14px; }
.editor-nav { display: flex; flex-wrap: wrap; gap: 4px 24px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.editor-nav button { background: none; color: var(--muted); border: 0; padding: 12px 0 14px; border-bottom: 3px solid transparent; min-height: 48px; }
.editor-nav button[aria-current="page"] { color: var(--text); font-weight: 650; border-color: var(--olive); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.section-description { max-width: 68ch; margin-bottom: 24px; }
.gallery-size { margin-bottom: 24px; }
.gallery-size legend { font-size: 14px; font-weight: 600; }
.gallery-size-options { display: flex; gap: 24px; }
.gallery-size-options label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; cursor: pointer; }
.gallery-size input[type="radio"] { width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; accent-color: var(--focus); }
.gallery-size .hint { margin: 0; }
.collection-layout { display: grid; grid-template-columns: minmax(230px, .8fr) minmax(0, 2fr); gap: 40px; align-items: start; }
.collection-tools { display: flex; flex-direction: column; gap: 14px; }
.collection-tools > .primary { align-self: start; }
.item-list { max-height: 660px; overflow-y: auto; border-top: 1px solid var(--line); margin: 0; padding: 0; list-style: none; }
.item-list li { border-bottom: 1px solid var(--line); }
.item-button { display: flex; align-items: center; width: 100%; min-height: 74px; gap: 14px; border: 0; background: transparent; color: var(--text); padding: 11px 8px; text-align: left; }
.item-button[aria-pressed="true"] { background: #e0e5bd; box-shadow: inset 3px 0 var(--olive); }
.item-button:hover { background: #e7ebc8; }
.item-thumb { width: 47px; height: 55px; object-fit: cover; background: #e4e8c9; flex: 0 0 auto; }
.item-name { overflow-wrap: anywhere; line-height: 1.3; font-size: 14px; }
.item-meta { display: block; font-size: 12px; margin-top: 4px; color: var(--muted); }
.item-editor { min-width: 0; }
.editor-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 20px; }
.editor-heading h3 { padding-top: 8px; }
.field { margin-bottom: 21px; }
.hint { display: block; font-size: 13px; line-height: 1.5; margin-top: 7px; }
.image-editor { display: grid; grid-template-columns: minmax(120px, .9fr) minmax(0, 1.6fr); gap: 24px; margin-bottom: 24px; align-items: start; }
.image-preview { height: 220px; margin: 0; background: #e5e9c9; display: flex; align-items: center; justify-content: center; padding: 12px; border: 1px solid var(--line); }
.image-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.image-placeholder { color: var(--muted); padding: 16px; text-align: center; font-size: 14px; }
.image-controls { min-width: 0; }
.image-controls .field { margin-bottom: 16px; }
.image-controls .text-button { font-size: 13px; }
.additional-photos { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 28px; }
.additional-photos > .hint { margin-bottom: 20px; }
.photo-list { list-style: none; margin: 0 0 24px; padding: 0; }
.photo-item { border-bottom: 1px solid var(--line); padding: 0 0 20px; margin-bottom: 24px; }
.photo-item h4 { margin: 0 0 14px; font-size: 15px; font-weight: 600; }
.photo-item .image-editor { margin-bottom: 8px; }
.photo-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.artwork-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 22px; margin-top: 28px; }
.reorder { display: flex; flex-wrap: wrap; gap: 8px; }
.empty-state { padding: 35px 20px; border: 1px dashed #a7af7c; text-align: center; color: var(--muted); }
.about-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(250px, .8fr); gap: 40px; }
.about-layout .image-editor { display: block; }
.about-layout .image-preview { height: 300px; margin-bottom: 20px; }
.about-body { min-height: 400px; }
.save-bar { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 0; margin-top: 45px; background: var(--paper); border-top: 1px solid #adb77e; z-index: 5; }
.save-bar strong { display: block; font-size: 14px; font-weight: 600; }
.save-bar span { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.save-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.save-actions button { font-size: 14px; }
.theme-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 28px; }
.preset-button { min-height: 78px; padding: 12px; display: flex; align-items: center; gap: 12px; border: 1px solid #a7af7c; border-radius: 3px; background: transparent; text-align: left; color: var(--text); }
.preset-button[aria-pressed="true"] { outline: 2px solid var(--focus); outline-offset: 2px; font-weight: 600; }
.preset-swatch { width: 38px; height: 42px; padding: 5px; border: 1px solid rgba(0,0,0,.15); display: flex; align-items: end; flex: 0 0 auto; }
.preset-swatch span { width: 100%; height: 10px; }
.color-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.color-inputs { display: flex; align-items: center; gap: 8px; }
input[type="color"] { width: 48px; height: 46px; padding: 3px; border: 1px solid #a7af7c; border-radius: 3px; background: var(--surface); flex-shrink: 0; }
.color-inputs input[type="text"] { min-width: 0; font-family: ui-monospace, monospace; }
.theme-preview { padding: 42px 28px; min-height: 360px; border: 1px solid var(--line); text-align: center; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.theme-preview .preview-signature { font: 27px/1.8 'Beth Ellen', cursive; }
.theme-preview h3 { font-size: 22px; margin-top: 35px; }
.theme-preview p { max-width: 25ch; }
.theme-preview .preview-link { border-bottom: 1px solid currentColor; font-size: 14px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 760px) {
  .admin-header { flex-direction: column; align-items: start; gap: 10px; padding: 18px 20px; }
  .signature { font-size: 23px; }
  .view-switch { gap: 24px; }
  .admin-main { padding-top: 28px; }
  .page-heading { flex-direction: column; gap: 0; }
  .account { justify-content: start; margin-bottom: 12px; }
  .editor-nav { gap: 0 20px; margin-bottom: 24px; }
  .editor-nav button { font-size: 14px; padding: 10px 0; }
  .collection-layout, .about-layout, .theme-layout { grid-template-columns: 1fr; gap: 28px; }
  .item-list { max-height: 245px; }
  .collection-tools { gap: 10px; }
  .item-button { min-height: 68px; }
  .item-thumb { height: 45px; width: 40px; }
  .save-bar { flex-direction: column; align-items: stretch; gap: 12px; padding: 14px 0 max(14px, env(safe-area-inset-bottom)); }
  .save-bar span { display: none; }
  .save-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .save-actions button { padding: 10px 8px; font-size: 13px; }
  .image-editor { grid-template-columns: 1fr; gap: 18px; }
  .image-preview { height: 260px; }
  .about-layout .image-preview { height: 280px; }
  .about-body { min-height: 330px; }
  .theme-preview { min-height: 320px; }
}
@media (prefers-reduced-motion: no-preference) { button, a { transition: background-color .15s, color .15s; } }
