:root {
  --ink: #163b39;
  --green: #17665b;
  --paper: #f6f5ef;
  --line: #d9e0d8;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 system-ui, sans-serif;
}

header {
  padding: 22px 6%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.brand {
  font-size: 27px;
  font-weight: 800;
}

.brand:hover {
  text-decoration: none;
}

.brand span {
  display: block;
  font-size: 11px;
  letter-spacing: 4px;
}

nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

button {
  background: var(--green);
  color: white;
  border: 0;
  border-radius: 8px;
  padding: 13px 20px;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

button:hover {
  filter: brightness(.92);
}

button:disabled {
  opacity: .5;
  cursor: default;
}

.secondary {
  background: #e6ece5;
  color: var(--ink);
}

.hero {
  padding: 65px 8% 90px;
  background: #dce8de;
  background-image: radial-gradient(ellipse at 90% 90%, #9cbba3 0, transparent 55%);
}

h1 {
  font-family: Georgia, serif;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.08;
  font-weight: 400;
  margin: 18px 0;
}

h2 {
  font-family: Georgia, serif;
  font-size: 30px;
  font-weight: 400;
  margin: 0 0 20px;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 750;
}

main {
  max-width: 1200px;
  margin: auto;
  padding: 0 24px;
}

.search {
  position: relative;
  margin-top: -40px;
  background: white;
  box-shadow: 0 10px 35px #163b3912;
  border-radius: 12px;
  padding: 20px;
  display: grid;
  grid-template-columns: 2fr 1.3fr 1.3fr .8fr auto;
  gap: 12px;
  align-items: end;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 650;
}

input,
select,
textarea {
  display: block;
  width: 100%;
  background: white;
  color: var(--ink);
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  margin-top: 5px;
}

textarea {
  resize: vertical;
}

input[type="checkbox"] {
  display: inline;
  width: auto;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

section#oferty,
section#rezerwacje {
  padding: 35px 0;
}

.notice {
  font-size: 13px;
  color: #65726c;
  margin: 24px 0;
}

.sectionhead {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.filters {
  display: flex;
  gap: 22px;
  align-items: center;
  margin: 10px 0 25px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card,
.empty,
.booking {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.card img,
.placeholder {
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.placeholder {
  display: grid;
  place-items: center;
  background: #dce8de;
  font-size: 60px;
}

.cardbody {
  padding: 22px;
}

.card h3 {
  margin: 0;
  font-size: 21px;
}

.muted {
  color: #65726c;
  font-size: 14px;
}

.price {
  font-size: 22px;
  font-weight: 750;
}

.price small {
  font-size: 13px;
  font-weight: 400;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 15px;
}

.empty {
  text-align: center;
  padding: 45px;
  grid-column: 1 / -1;
}

.empty h3 {
  font-size: 24px;
  margin: 8px;
}

.booking {
  padding: 22px;
  margin: 14px 0;
}

.owner-email {
  display: inline-block;
  margin: 4px 0 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

footer {
  padding: 30px 6%;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

dialog {
  border: 0;
  border-radius: 14px;
  padding: 28px;
  max-width: 620px;
  width: calc(100% - 32px);
  max-height: 90vh;
  overflow: auto;
}

dialog::backdrop {
  background: #102c2a99;
}

dialog label {
  margin: 12px 0;
}

#details img,
#details .placeholder {
  border-radius: 10px;
}

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.description {
  white-space: pre-wrap;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #c69936;
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .search {
    grid-template-columns: 1fr 1fr;
  }

  .grid {
    grid-template-columns: 1fr 1fr;
  }

  header {
    flex-wrap: wrap;
    gap: 15px;
  }

  nav {
    gap: 12px;
    font-size: 13px;
  }
}

@media (max-width: 600px) {
  .search,
  .grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 35px;
  }

  .filters,
  .sectionhead {
    align-items: stretch;
    flex-direction: column;
  }

  nav {
    flex-wrap: wrap;
  }

  .two {
    grid-template-columns: 1fr;
  }
}

.backend-status {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.backend-status.success {
  border-color: #9bc8af;
  background: #edf8f0;
  color: #245f3d;
}

.backend-status.error {
  border-color: #dfaaa5;
  background: #fff1ef;
  color: #7d3029;
}

.hp {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .95em;
}


.auth-open {
  white-space: nowrap;
}

.google-button {
  width: 100%;
  background: #fff;
  color: #24312e;
  border: 1px solid var(--line);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.google-button span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f2f4f3;
  font-weight: 800;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: #75817c;
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.auth-tabs button.active {
  background: var(--ink);
  color: #fff;
}

#authEmailForm > button {
  width: 100%;
  margin-top: 8px;
}

.auth-privacy {
  margin-top: 14px;
}

.account-card {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px;
  background: #f3f6f2;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.account-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 20px;
  overflow: hidden;
}

.account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.field-help {
  display: block;
  margin-top: 6px;
  color: #65726c;
  font-size: 12px;
  font-weight: 400;
}

.image-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 18px;
}

.image-preview-item {
  min-width: 0;
}

.image-preview-item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.image-preview-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 4px;
  font-size: 11px;
  color: #65726c;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.detail-gallery img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 10px;
}

.detail-gallery img:first-child:nth-last-child(n+3) {
  grid-column: 1 / -1;
  height: 300px;
}

.notice.error {
  color: #7d3029;
}

@media (max-width: 600px) {
  .image-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-gallery { grid-template-columns: 1fr; }
  .detail-gallery img,
  .detail-gallery img:first-child:nth-last-child(n+3) { height: 220px; grid-column: auto; }
}
