:root {
  --bg: #f7f3e8;
  --bg-top: #fdfbf4;
  --bg-mid: #f3eee2;
  --bg-bottom: #ece4d5;
  --bg-glow: rgba(255, 252, 244, 0.95);
  --bg-glow-fade: rgba(255, 252, 244, 0);
  --surface: #ffffff;
  --surface-alt: #f1efe7;
  --text: #111512;
  --muted: #61685f;
  --field-rest: #676f66;
  --field-focus: #111512;
  --accent: #111512;
  --border: #111512;
  --shadow: 0 18px 40px rgba(17, 21, 18, 0.08);
  --card-shadow: drop-shadow(0 12px 20px rgba(17, 21, 18, 0.11));
  --radius: 20px;
  --radius-sm: 12px;
  --max-width: 760px;
  --font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  background-color: var(--bg);
  min-height: 100%;
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: transparent;
}
.page-shell {
  min-height: 100vh;
  background: transparent;
}
button, input, select, textarea { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
body.is-compact-header .site-header { padding-top: 0.65rem; }
body.is-compact-header .site-header__inner { padding: 0.8rem 1rem; backdrop-filter: blur(14px); }
body.is-compact-header .site-header__brand { font-size: 1.05rem; letter-spacing: 0.08em; }
.site-header { position: sticky; top: 0; z-index: 20; padding: 1.2rem 0 0; background: transparent; }
.site-header__inner, .page-main { width: min(calc(100% - 1.5rem), 1060px); margin: 0 auto; }
.site-header__inner {
  padding: 1.2rem 1.3rem; display: flex; align-items: center; justify-content: space-between;
  border: 1px solid rgba(216, 221, 214, 0.9); border-radius: 999px; background: rgba(252, 250, 242, 0.9); box-shadow: var(--shadow);
}
.site-header__brand { color: var(--text); text-decoration: none; text-transform: uppercase; letter-spacing: 0.18em; font-size: 1.35rem; font-weight: 600; }
.site-header__actions, .admin-bar__actions, .feed-card__admin { display: flex; align-items: center; gap: 0.75rem; }
.site-header__contact { color: var(--muted); text-decoration: none; font-weight: 500; }
.site-header__contact:hover, .site-header__contact:focus-visible { color: var(--accent); }
.page-main { padding: 2rem 0 5rem; background: transparent; }
.hero { padding: 3.2rem 0 1rem; display: grid; gap: 1rem; }
.hero__eyebrow { margin: 0; color: var(--accent); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8rem; font-weight: 700; }
.admin-bar, .feed-card, .feed__empty, .feed__loading, .info-box { width: min(100%, var(--max-width)); margin: 0 auto; }
.admin-bar {
  margin-bottom: 1.5rem; padding: 1rem 1.1rem; display: flex; justify-content: space-between; gap: 1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.admin-bar__label, .admin-bar__status, .field__hint, .dialog__error, .feed-card__description, .feed-card__meta, .feed-card__date { margin: 0; }
.admin-bar__label { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; }
.feed, .feed__list, .editor-media-list, .field { display: grid; gap: 1rem; }
.feed__empty, .feed__loading { padding: 1rem 1.2rem; color: var(--muted); text-align: center; }
.info-box {
  margin-bottom: 1rem; padding: 1rem 1.15rem; display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  border: 1px solid rgba(47, 92, 69, 0.2); border-radius: 18px; background: #edf5ef; box-shadow: var(--shadow);
}
.info-box__content { white-space: pre-wrap; line-height: 1.5; }
.info-box__dismiss { flex-shrink: 0; width: 2rem; height: 2rem; }
.feed-card { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; overflow: hidden; filter: var(--card-shadow); }
.feed-card__header, .feed-card__footer { padding: 1rem 1.15rem; }
.feed-card__header { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: start; gap: 1rem; }
.feed-card__title-row { min-width: 0; }
.feed-card__title { margin: 0; width: 80%; font-size: 1.35rem; line-height: 1.2; overflow-wrap: anywhere; }
.feed-card__date, .feed-card__meta { color: var(--muted); font-size: 0.9rem; white-space: nowrap; }
.feed-card__media { background: #ebe8de; aspect-ratio: 4 / 3; }
.feed-card__media img, .feed-card__media video {
  display: block; width: 100%; height: 100%; object-fit: contain; background: #d9ddd4;
}
.feed-card__footer { border-top: 1px solid rgba(216, 221, 214, 0.75); }
.feed-card__description { line-height: 1.55; white-space: pre-wrap; }
.feed-card__read-more {
  margin-top: 0.75rem; padding: 0; border: 0; background: transparent; color: var(--accent); font-weight: 600; cursor: pointer;
}
.group-grid {
  display: grid; gap: 0.2rem; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; height: 100%;
  padding: 0; border: 0; background: transparent; cursor: pointer;
}
.group-grid--single { grid-template-columns: 1fr; }
.group-grid__item { position: relative; min-height: 0; background: #d9ddd4; overflow: hidden; }
.group-grid__item img { width: 100%; height: 100%; object-fit: cover; }
.group-grid__overlay {
  position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(17, 21, 18, 0.4); font-size: 1.8rem; font-weight: 600;
}
.button, .icon-button {
  border: 1px solid #111512; background: #fff; color: #111512; cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}
.button {
  min-height: 2.75rem; padding: 0.7rem 1rem; border-radius: 8px; font-weight: 600; letter-spacing: 0.01em;
}
.button:hover, .button--primary { background: #111512; color: #fff; border-color: #111512; transform: translateY(-1px); }
.button--primary { background: #111512; border-color: #111512; color: #fff; }
.button--small { min-height: 2.2rem; padding: 0.45rem 0.8rem; font-size: 0.9rem; border-radius: 8px; }
.icon-button {
  width: 2.5rem; height: 2.5rem; padding: 0; border: 0; background: transparent; display: inline-grid; place-items: center; font-size: 1.2rem;
}
.icon-button__icon { width: 1.35rem; height: 1.35rem; display: block; }
.icon-button:hover { background: transparent; color: #111512; border-color: transparent; }
.icon-button--light { background: transparent; border-color: transparent; color: #fff; }
.icon-button--light:hover { color: rgba(255,255,255,0.72); }
.dialog { border: 0; padding: 0; background: transparent; }
.dialog::backdrop { background: rgba(17, 21, 18, 0.48); backdrop-filter: blur(6px); }
.dialog__panel { width: min(calc(100vw - 1.5rem), 32rem); padding: 1.25rem; border: 1px solid var(--border); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); }
.dialog__panel--wide { width: min(calc(100vw - 1.5rem), 52rem); }
.dialog__panel--gallery { width: min(calc(100vw - 1rem), 76rem); padding: 0; overflow: hidden; background: #0d110e; color: #fff; }
.dialog__header, .field__row, .editor-media-item__top, .dialog__actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.dialog__header { margin-bottom: 1rem; }
.dialog__header h2 { margin: 0; font-size: 1.3rem; }
.dialog__header--overlay { margin: 0; padding: 1rem 1rem 0; }
.dialog__actions { justify-content: flex-end; margin-top: 1.2rem; }
.dialog__error { min-height: 1.3rem; color: #8a1f1f; }
.field span { font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.9rem 1rem; border: 1px solid var(--field-rest); border-radius: 8px; background: #fff; color: var(--field-rest); box-shadow: none;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(103, 111, 102, 0.72); }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--field-focus);
  color: var(--field-focus);
  outline: none;
}
.field textarea { resize: none; min-height: 8rem; }
.field input[type="color"] { padding: 0.35rem; height: 3rem; }
.field__hint { color: var(--muted); font-size: 0.9rem; }
.file-button { position: relative; overflow: hidden; }
.file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.editor-media-item { display: grid; gap: 0.8rem; padding: 0.85rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-alt); }
.editor-media-item__name { display: grid; gap: 0.2rem; }
.editor-media-item__name strong { font-size: 0.96rem; }
.editor-media-item__name span { color: var(--muted); font-size: 0.84rem; }
.editor-media-item img, .editor-media-item video {
  width: 100%; max-height: 240px; border-radius: 12px; background: #d9ddd4; object-fit: contain;
}
.gallery { display: grid; grid-template-columns: 4rem minmax(0, 1fr) 4rem; align-items: center; min-height: min(82vh, 52rem); }
.gallery__figure { margin: 0; padding: 1rem; display: grid; gap: 0.8rem; justify-items: center; }
.gallery__figure img { max-width: 100%; max-height: 72vh; object-fit: contain; }
.gallery__figure figcaption { color: rgba(255,255,255,0.8); }
.gallery__nav { height: 100%; border: 0; color: #fff; background: transparent; font-size: 2.5rem; cursor: pointer; }
.is-hidden { display: none !important; }

@media (max-width: 760px) {
  .site-header__inner, .page-main { width: min(calc(100% - 1rem), 100%); }
  .hero { padding-top: 2rem; }
  .admin-bar, .feed-card__header, .dialog__actions, .field__row, .info-box { flex-direction: column; align-items: stretch; }
  .feed-card__header { grid-template-columns: 1fr; }
  .feed-card__title { width: 100%; }
  .gallery { grid-template-columns: 1fr; }
  .gallery__nav { height: 3rem; }
}
