:root {
  --ink: #18212f;
  --muted: #6c7480;
  --line: #e6e8ec;
  --paper: #f8f8f6;
  --card: #ffffff;
  --accent: #e36c4f;
  --accent-soft: #fff0eb;
  --shadow: 0 18px 45px rgba(24, 33, 47, .09);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.site-header { display: flex; justify-content: space-between; align-items: center; padding: 28px 0; }
.brand { font-weight: 800; font-size: 1.2rem; letter-spacing: -.04em; }
.brand span { color: var(--accent); }
.text-link { color: var(--muted); font-size: .9rem; }
.text-link:hover { color: var(--ink); }
.gallery-heading { padding: 46px 0 24px; }
.gallery-heading h1 { font-size: clamp(2rem, 5vw, 3.8rem); margin: 0; }
.eyebrow { color: var(--accent); font-size: .68rem; font-weight: 800; letter-spacing: .18em; margin: 0 0 14px; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(2.4rem, 7vw, 5.2rem); letter-spacing: -.07em; line-height: .98; margin-bottom: 22px; }
h1 em { color: var(--accent); font-style: normal; }
h2 { letter-spacing: -.04em; margin-bottom: 8px; }
.hero-copy, .muted { color: var(--muted); line-height: 1.7; }
.filters { display: flex; gap: 16px; align-items: flex-start; border-top: 1px solid var(--line); padding: 20px 0; }
.filter-label { color: var(--muted); font-size: .82rem; padding: 7px 0; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip { background: transparent; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); cursor: pointer; font: inherit; font-size: .78rem; padding: 7px 13px; transition: .2s ease; }
.tag-chip:hover, .tag-chip.active { background: var(--ink); border-color: var(--ink); color: white; }
.status { min-height: 32px; color: var(--muted); font-size: .9rem; padding: 8px 0; }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding-bottom: 80px; }
.photo-card { background: var(--card); border-radius: 4px; box-shadow: 0 3px 12px rgba(24,33,47,.04); cursor: zoom-in; overflow: hidden; }
.photo-card img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform .35s ease; }
.photo-card:hover img { transform: scale(1.035); }
.photo-meta { padding: 12px 14px 14px; }
.photo-name { font-size: .78rem; margin: 0 0 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-tags { color: var(--accent); font-size: .7rem; }
.empty { grid-column: 1 / -1; border: 1px dashed #d5d8de; color: var(--muted); padding: 70px 20px; text-align: center; }
.lightbox { border: 0; border-radius: 8px; max-width: min(92vw, 1000px); padding: 0; background: #111; box-shadow: var(--shadow); }
.lightbox::backdrop { background: rgba(8, 12, 18, .82); }
.lightbox img { display: block; max-height: 84vh; max-width: 92vw; object-fit: contain; }
.lightbox p { color: white; font-size: .8rem; margin: 0; padding: 10px 14px 13px; }
.dialog-close { background: rgba(0,0,0,.55); border: 0; border-radius: 50%; color: white; cursor: pointer; font-size: 1.5rem; height: 34px; line-height: 1; position: absolute; right: 12px; top: 12px; width: 34px; }
.admin-main { padding: 58px 0 100px; }
.admin-main h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 28px; }
.login-panel { margin: 40px auto; max-width: 480px; }
.stack-form { display: grid; gap: 15px; margin-top: 28px; }
label { color: var(--ink); display: grid; font-size: .8rem; font-weight: 700; gap: 8px; }
input { background: #fff; border: 1px solid #d9dce2; border-radius: 4px; color: var(--ink); font: inherit; font-size: .95rem; font-weight: 400; padding: 12px 13px; width: 100%; }
input:focus { border-color: var(--accent); outline: 2px solid var(--accent-soft); }
.button { border: 1px solid transparent; border-radius: 4px; cursor: pointer; font: inherit; font-size: .82rem; font-weight: 700; padding: 11px 17px; }
.button.primary { background: var(--ink); color: white; }
.button.primary:hover { background: #2b3a50; }
.button.ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.form-status { color: var(--accent); font-size: .82rem; min-height: 18px; margin: 0; }
.admin-heading { align-items: end; display: flex; justify-content: space-between; margin-bottom: 28px; }
.admin-heading.compact { margin-top: 55px; }
.admin-heading h1, .admin-heading h2 { margin-bottom: 4px; }
.admin-heading .muted { font-size: .85rem; margin: 0; }
.upload-panel { display: grid; gap: 16px; grid-template-columns: 1fr 1fr 1fr auto; align-items: end; }
.upload-copy { align-self: center; }
.upload-copy h2 { margin-bottom: 4px; }
.upload-copy .muted { font-size: .82rem; margin: 0; }
.tag-panel { display: grid; gap: 18px; margin-bottom: 22px; }
.inline-form { align-items: end; display: flex; gap: 12px; }
.inline-form label { flex: 1; }
.field-label { color: var(--ink); display: block; font-size: .8rem; font-weight: 700; margin-bottom: 8px; }
.tag-options { display: flex; flex-wrap: wrap; gap: 8px; min-height: 22px; }
.tag-option { align-items: center; background: #fafafa; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); cursor: pointer; display: inline-flex; font-size: .76rem; font-weight: 500; gap: 6px; padding: 8px 10px; }
.tag-option:has(input:checked) { background: var(--accent-soft); border-color: #e9a18e; color: var(--accent); }
.tag-option input { accent-color: var(--accent); height: 14px; margin: 0; width: 14px; }
.tag-options-empty { color: var(--muted); font-size: .78rem; }
.managed-tag { background: var(--accent-soft); border-radius: 999px; color: var(--accent); font-size: .76rem; padding: 8px 11px; }
.file-drop { background: var(--accent-soft); border: 1px dashed #e9a18e; border-radius: 4px; color: var(--accent); cursor: pointer; padding: 13px; text-align: center; }
.file-drop input { display: none; }
.admin-grid { display: grid; gap: 16px; grid-template-columns: repeat(4, 1fr); }
.admin-card { background: var(--card); border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.admin-card img { aspect-ratio: 1; display: block; object-fit: cover; width: 100%; }
.admin-card-body { display: grid; gap: 9px; padding: 13px; }
.admin-card-body input { font-size: .75rem; padding: 9px; }
.admin-actions { display: flex; gap: 7px; }
.small-button { background: white; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); cursor: pointer; font-size: .72rem; padding: 7px 9px; }
.small-button:hover { border-color: var(--ink); color: var(--ink); }
.small-button.delete:hover { border-color: #bd4d48; color: #bd4d48; }
.hidden { display: none !important; }
@media (max-width: 900px) { .gallery, .admin-grid { grid-template-columns: repeat(3, 1fr); } .upload-panel { grid-template-columns: 1fr 1fr; } .upload-panel .upload-copy { grid-column: 1 / -1; } .upload-panel > div:nth-child(3) { grid-column: 1 / -1; } }
@media (max-width: 600px) { .shell { width: min(100% - 28px, 1180px); } .site-header { padding: 20px 0; } .gallery-heading { padding: 34px 0 18px; } .gallery, .admin-grid { gap: 8px; grid-template-columns: repeat(2, 1fr); } .filters { display: block; } .filter-label { display: block; margin-bottom: 8px; } .panel { padding: 20px; } .upload-panel { grid-template-columns: 1fr; } .upload-panel .upload-copy, .upload-panel > div:nth-child(3) { grid-column: auto; } .inline-form { align-items: stretch; flex-direction: column; } .admin-heading { align-items: start; } }
