:root {
  color-scheme: light;
  --ink: #111815;
  --muted: #65706a;
  --line: #d9dfda;
  --paper: #f5f6f1;
  --surface: #ffffff;
  --accent: #1f8a5b;
  --accent-2: #235c9b;
  --danger: #b43b34;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.site-header {
  background: #111815;
  color: #fff;
}
.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1180px;
  margin: auto;
  padding: 14px 22px;
}
.brand {
  color: inherit;
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--accent);
  border-radius: 7px;
  font-weight: 900;
  letter-spacing: 0;
}
.brand strong, .brand small { display: block; }
.brand small { margin-top: 2px; color: #bdc8c0; font-size: .78rem; }
.top-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.hero {
  max-width: 1180px;
  margin: auto;
  padding: 58px 22px 72px;
}
.eyebrow {
  margin: 0 0 12px;
  color: #89d2b0;
  font-size: .78rem;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: .08em;
}
.hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.6rem, 9vw, 6.4rem);
  line-height: .92;
  letter-spacing: 0;
}
.hero p:last-child {
  max-width: 640px;
  margin: 18px 0 0;
  color: #d6ded9;
  font-size: clamp(1.02rem, 3vw, 1.35rem);
}
main {
  max-width: 1180px;
  margin: auto;
  padding: 24px 22px 70px;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  padding: 18px 0 26px;
}
.toolbar strong, .toolbar span { display: block; }
.toolbar span { margin-top: 3px; color: var(--muted); font-size: .92rem; }
.toolbar label { display: grid; gap: 7px; color: #3f4944; font-size: .83rem; font-weight: 800; }
select, input, textarea {
  width: 100%;
  border: 1px solid #aeb9b1;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}
select, input { min-height: 44px; padding: 0 12px; }
textarea { padding: 10px 12px; resize: vertical; line-height: 1.45; }
.button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 14px;
  font-weight: 850;
}
.button.primary { background: var(--accent); color: #fff; }
.button.ghost { background: #ffffff10; border-color: #ffffff30; color: inherit; }
main .button.ghost, .modal .button.ghost { background: #fff; border-color: #cfd8d2; color: #1c2520; }
.button.danger { background: #fff3f1; border-color: #d6aaa5; color: var(--danger); }
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}
.post {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 32px #18251d12;
}
.carousel {
  position: relative;
  background: #dfe5df;
}
.photo-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.photo-track::-webkit-scrollbar { display: none; }
.photo-track img {
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  scroll-snap-align: center;
  background: #cdd6cf;
}
.round {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #111815d9;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
}
.round.previous { left: 10px; }
.round.next { right: 10px; }
.post[data-single="true"] .round { display: none; }
.post-body { padding: 16px 17px 18px; }
.post-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: .82rem;
}
.category {
  color: var(--accent);
  font-weight: 900;
  text-transform: uppercase;
  font-size: .75rem;
}
.post h2 {
  margin: 9px 0 7px;
  font-size: 1.2rem;
  line-height: 1.2;
}
.comment {
  margin: 0;
  color: #33403a;
  line-height: 1.48;
  white-space: pre-wrap;
}
.admin-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}
.empty {
  padding: 42px 0;
  border-top: 1px solid var(--line);
}
.empty h2 { margin: 0 0 8px; }
.empty p { margin: 0; color: var(--muted); }
.modal {
  width: min(720px, calc(100vw - 24px));
  padding: 0;
  border: 1px solid #9ba9a0;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}
.modal::backdrop { background: #07100bcc; }
.modal-panel {
  display: grid;
  gap: 14px;
  padding: 0;
}
.modal-panel > header, .modal-panel > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: #f5f7f4;
}
.modal-panel > header { border-bottom: 1px solid var(--line); }
.modal-panel > footer { border-top: 1px solid var(--line); }
.modal-panel h2 { margin: 0; font-size: 1.22rem; }
.modal-panel p, .modal-panel label, .preview-strip, .hint, .error { margin-inline: 18px; }
.modal-panel label { display: grid; gap: 7px; font-size: .86rem; font-weight: 850; color: #3f4944; }
.icon {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #e8eee9;
  color: #1b241f;
  font-size: 1.5rem;
}
.file-picker {
  padding: 14px;
  border: 1px dashed #8ea79a;
  border-radius: 7px;
  background: #f6faf7;
}
.file-picker input { margin-top: 8px; border: 0; padding: 0; min-height: 0; background: transparent; }
.file-picker span { color: var(--muted); font-weight: 650; }
.preview-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.preview-strip img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  background: #dbe4dd;
}
.hint { color: var(--muted); font-size: .86rem; line-height: 1.4; }
.error {
  padding: 10px 12px;
  border-left: 4px solid var(--danger);
  background: #fff0ee;
  color: #7d2b25;
}
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid #d69b17;
  outline-offset: 2px;
}
@media (max-width: 780px) {
  .topbar, .toolbar { align-items: stretch; flex-direction: column; }
  .top-actions { justify-content: stretch; }
  .top-actions .button { flex: 1; }
  .hero { padding-block: 42px 52px; }
  main { padding-inline: 14px; }
  .gallery { grid-template-columns: 1fr; gap: 18px; }
  .post { border-radius: 0; margin-inline: -14px; border-inline: 0; }
  .modal { width: min(100vw - 10px, 720px); }
  .modal-panel > footer { align-items: stretch; flex-direction: column-reverse; }
  .modal-panel > footer .button { width: 100%; min-height: 48px; }
  .preview-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
