:root {
    color-scheme: light;
    --bg: #f4f3ef;
    --surface: #ffffff;
    --text: #1c1d1b;
    --muted: #666962;
    --border: #dddcd7;
    --accent: #2f5b4f;
    --accent-hover: #23473d;
    --danger: #a63a32;
    --shadow: 0 12px 34px rgba(0,0,0,.09);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}
body.no-scroll { overflow: hidden; }
.wrap { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }
.site-header {
    padding: 52px 0 34px;
    background: linear-gradient(135deg, #f8f7f2, #e7ebe7);
    border-bottom: 1px solid var(--border);
}
.site-header.compact { padding: 34px 0 24px; }
.eyebrow {
    margin: 0 0 7px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .78rem;
    font-weight: 750;
}
h1 { margin: 0 0 18px; font-size: clamp(2rem, 5vw, 4rem); line-height: 1.02; }
h2 { margin-top: 0; }
.main-content { padding: 34px 0 56px; }
.button, button.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: white;
    padding: 11px 18px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}
.button:hover { background: var(--accent-hover); }
.button.secondary { background: #e5e7e3; color: var(--text); }
.gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.gallery-item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 15px;
    background: #ddd;
    aspect-ratio: 4 / 3;
    box-shadow: 0 4px 15px rgba(0,0,0,.05);
}
.gallery-item img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform .22s ease;
}
.gallery-item:hover img { transform: scale(1.025); }
.gallery-item span {
    position: absolute; right: 9px; bottom: 9px;
    min-width: 30px; height: 30px; padding: 0 8px;
    display: grid; place-items: center;
    border-radius: 999px;
    color: white; background: rgba(0,0,0,.58);
    font-size: .82rem; font-weight: 700;
}
.empty-state, .panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 5px 25px rgba(0,0,0,.04);
}
.lightbox {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(12,13,12,.94);
    display: grid; place-items: center;
    padding: 34px 68px;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: grid; gap: 10px; }
.lightbox img { max-width: min(92vw, 1500px); max-height: 84vh; object-fit: contain; display: block; }
.lightbox figcaption { color: #eee; text-align: center; }
.lightbox-close, .lightbox-nav {
    position: fixed; border: 0; cursor: pointer;
    background: rgba(255,255,255,.12); color: white;
    width: 46px; height: 46px; border-radius: 999px;
    font-size: 2rem; line-height: 1;
}
.lightbox-close { top: 18px; right: 18px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); }
.lightbox-nav.prev { left: 18px; }
.lightbox-nav.next { right: 18px; }
.site-footer { padding: 26px 0 38px; color: var(--muted); font-size: .9rem; }
.admin-content { max-width: 900px; }
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.panel { margin-bottom: 22px; }
.login-panel { max-width: 480px; }
label { display: block; font-weight: 700; margin-bottom: 8px; }
input[type="password"] {
    width: 100%; max-width: 420px; padding: 12px 13px; margin: 0 0 13px;
    border: 1px solid var(--border); border-radius: 10px; font: inherit;
}
.file-picker {
    display: block; border: 2px dashed var(--border); border-radius: 13px;
    padding: 20px; margin: 12px 0; cursor: pointer; background: #fafafa;
}
.file-picker input { display: block; margin-top: 10px; max-width: 100%; }
.admin-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.admin-card { overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: #fafafa; }
.admin-card img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.admin-card form { padding: 10px; }
.danger-button {
    width: 100%; border: 1px solid #d8b6b2; background: #fff; color: var(--danger);
    border-radius: 9px; padding: 9px 12px; font: inherit; font-weight: 700; cursor: pointer;
}
.notice { border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.notice.success { background: #e7f2eb; border: 1px solid #bdd8c7; }
.notice.error { background: #fae9e7; border: 1px solid #e5beb9; }
.muted { color: var(--muted); font-weight: 500; }
@media (max-width: 760px) {
    .gallery, .admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .lightbox { padding: 62px 12px 54px; }
    .lightbox-nav { top: auto; bottom: 14px; transform: none; }
    .lightbox-nav.prev { left: calc(50% - 58px); }
    .lightbox-nav.next { right: calc(50% - 58px); }
    .lightbox-close { top: 10px; right: 10px; }
}
@media (max-width: 430px) {
    .wrap { width: min(100% - 20px, 1160px); }
    .gallery { gap: 7px; }
    .gallery-item { border-radius: 10px; }
}
