.guestbook-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1100;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  color: #142019;
  background: var(--green);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
  font: inherit;
  font-weight: 800;
}

.guestbook-fab:hover {
  background: #d2f2aa;
  transform: translateY(-2px);
}

.guestbook-fab svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.guestbook-dialog {
  width: min(1050px, calc(100% - 32px));
  max-height: calc(100svh - 32px);
  padding: 0;
  color: var(--text);
  background: #101a14;
  border: 1px solid #45614c;
  border-radius: 20px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.62);
  overflow: auto;
}

.guestbook-dialog::backdrop {
  background: rgba(3, 8, 5, 0.82);
  backdrop-filter: blur(5px);
}

.guestbook-modal {
  position: relative;
  padding: clamp(24px, 5vw, 46px);
}

.guestbook-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--text);
  background: #17271e;
  border: 1px solid #45614c;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

.guestbook-close:hover {
  color: #142019;
  background: var(--green);
}

.guestbook-heading {
  max-width: 690px;
  margin-bottom: 28px;
  padding-right: 50px;
}

.guestbook-heading h2 {
  margin-bottom: 12px;
}

.guestbook-heading p {
  margin-bottom: 0;
}

.guestbook-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 20px;
  align-items: start;
}

.guestbook-form,
.guestbook-wall {
  background: linear-gradient(145deg, #1b3325, #121d17);
  border: 1px solid #36513e;
  border-radius: 16px;
  padding: clamp(20px, 3vw, 28px);
}

.guestbook-form label {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 700;
}

.guestbook-form input,
.guestbook-form textarea {
  width: 100%;
  margin-bottom: 16px;
  padding: 12px;
  color: var(--text);
  background: #101c17;
  border: 1px solid #52705b;
  border-radius: 8px;
  font: inherit;
}

.guestbook-form textarea {
  resize: vertical;
}

.guestbook-form input:focus,
.guestbook-form textarea:focus {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.guestbook-form .btn {
  border: 0;
}

#guestbook-status {
  min-height: 1.5em;
  margin: 14px 0 0;
  color: #d9ffb3;
}

.guestbook-wall-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #36513e;
}

.guestbook-wall-title h3 {
  margin: 0;
  font-size: 24px;
}

.guestbook-wall-title span {
  color: var(--green);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 1px;
}

.guestbook-messages {
  display: grid;
  gap: 12px;
  max-height: 380px;
  margin-top: 16px;
  padding-right: 5px;
  overflow-y: auto;
}

.guestbook-entry {
  padding: 16px;
  background: rgba(11, 16, 14, 0.48);
  border: 1px solid #2a4635;
  border-radius: 12px;
}

.guestbook-entry header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.guestbook-entry strong {
  color: var(--text);
}

.guestbook-entry time {
  color: var(--green);
  font-size: 11px;
  white-space: nowrap;
}

.guestbook-entry p,
.guestbook-empty {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .guestbook-layout {
    grid-template-columns: 1fr;
  }

  .guestbook-fab {
    right: 16px;
    bottom: 16px;
  }

  .guestbook-fab span {
    display: none;
  }

  .guestbook-fab {
    width: 54px;
    height: 54px;
    justify-content: center;
    padding: 0;
  }
}
