.contact-page {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  grid-template-areas:
    "contact guestbook";
  align-items: start;
  column-gap: clamp(44px, 8vw, 120px);
  max-width: 1240px;
  min-height: calc(100vh - 88px);
  margin: 0 auto;
  padding: 30px 4% 72px;
}

.contact-heading {
  grid-area: heading;
  padding: 24px 0 30px;
}

.contact-heading h1 {
  margin: 0;
  font-size: clamp(21px, 1.8vw, 28px);
  font-weight: 400;
}

.contact-content {
  grid-area: contact;
  position: sticky;
  top: 82px;
  align-self: start;
  min-width: 0;
  max-width: 560px;
  margin: 0;
}

.contact-intro {
  margin: 0 0 28px;
  font-size: 22px;
}

.contact-form {
  display: grid;
  gap: 22px;
}

.contact-field {
  display: grid;
  gap: 8px;
}

.contact-field label {
  font-size: 15px;
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #bdbab5;
  border-radius: 0;
  background: #fff;
  color: #171717;
  font: inherit;
  font-size: 16px;
}

.contact-field textarea {
  min-height: 160px;
  resize: vertical;
}

.contact-field input:focus,
.contact-field textarea:focus {
  outline: 2px solid #555;
  outline-offset: 2px;
}

.contact-submit {
  justify-self: start;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid #171717;
  background: #171717;
  color: #fff;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}

.contact-submit:hover {
  background: #fff;
  color: #171717;
}

.contact-errors,
.contact-success {
  margin: 0 0 20px;
  color: #8b2822;
}

.contact-errors p {
  margin: 0 0 6px;
}

.contact-success {
  color: #315c3b;
}

.contact-section-title {
  margin: 0 0 14px;
  font-size: 26px;
  font-weight: 400;
}

.guestbook-section {
  grid-area: guestbook;
  min-width: 0;
  max-width: 700px;
  margin: 0;
  padding: 0;
}

.guestbook-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 8px;
  padding-bottom: 0;
}

.guestbook-kicker {
  margin: 0 0 6px;
  color: #777;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.guestbook-heading h2 {
  display: inline-block;
  margin: 0;
  font-size: clamp(32px, 4.4vw, 42px);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.015em;
}

.guestbook-heading > p {
  margin: 0;
  color: #777;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: -0.015em;
  text-align: justify;
  hyphens: auto;
}

.guestbook-form {
  display: grid;
  gap: 12px;
  max-width: 720px;
  margin: 0;
}

.guestbook-form input[type="file"] {
  padding: 8px 0;
  border: 0;
}

.guestbook-form small {
  color: #777;
  font-size: 12px;
}

.guestbook-errors {
  margin: 0 0 18px;
  color: #8b2822;
}

.guestbook-errors p { margin: 0 0 6px; }

.guestbook-messages {
  display: grid;
  gap: 24px;
  margin: 18px 0 28px;
}

.guestbook-entry {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #403b32;
  border-radius: 16px;
  background: #fffdf8;
  font-family: "Courier New", Courier, monospace;
}

.guestbook-entry-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 0;
  padding: 14px 22px;
  border-top: 1px solid #403b32;
  background: #c59a3e;
  color: #30271a;
  text-align: left;
}

.guestbook-entry-header h3 {
  display: inline;
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.guestbook-entry-header time,
.guestbook-reply time {
  color: #4c3b22;
  font-size: 11px;
}

.guestbook-entry-message {
  width: 100%;
  max-width: 100%;
  margin: 0 0 8px;
  padding: 0;
  background: none;
  color: #3f3d3a;
  font-style: italic;
  line-height: 1.6;
  text-align: left;
}

.guestbook-pinned-label {
  margin-right: 8px;
  padding: 4px 7px;
  border: 1px solid #aaaaaa;
  color: #555555;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.guestbook-entry-message,
.guestbook-reply > p:not(.guestbook-reply-label) {
  margin: 0;
  color: #444;
  font-size: 15px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.guestbook-entry.is-pinned .guestbook-entry-message {
  filter: none;
}

.guestbook-entry .guestbook-entry-message {
  padding: 24px 22px;
  color: #292929;
  font-size: 17px;
  font-style: normal;
  line-height: 28px;
  letter-spacing: 0;
  text-align: left;
  hyphens: none;
}

.guestbook-entry-image {
  display: block;
  max-width: min(100%, 560px);
  max-height: 520px;
  margin: 22px auto 0;
  object-fit: contain;
  object-position: left center;
}

.guestbook-reply {
  margin: 0 22px 20px;
  padding: 14px 16px;
  border-left: 1px solid #888;
  background: none;
}

.guestbook-reply-label {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
}

.guestbook-empty {
  color: #777;
  font-size: 14px;
}

.guestbook-sign-entry {
  width: 100%;
  margin: 0 0 24px;
  padding: 8px 10px;
  border: 1px solid #e0ddd7;
  background: #f8f7f4;
}

.guestbook-sign-entry > h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
}

.guestbook-sign-entry > p:not(.guestbook-errors) {
  margin: 3px 0 10px;
  color: #777;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: -0.015em;
  text-align: justify;
  hyphens: auto;
}

.guestbook-form .contact-field {
  gap: 3px;
}

.guestbook-form .contact-field label {
  color: #555;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.guestbook-form .contact-field input:not([type="file"]),
.guestbook-form .contact-field textarea {
  padding: 6px 8px;
  border-color: #d0cdc7;
  background: #fff;
  font-size: 14px;
}

.guestbook-form .contact-field input[type="file"] {
  width: 100%;
  padding: 5px;
  border: 1px dashed #aaa49a;
  background: #fffdf7;
  color: #5e5b55;
  font: inherit;
  font-size: 13px;
}

.guestbook-form .contact-field input[type="file"]::file-selector-button {
  margin-right: 8px;
  padding: 5px 9px;
  border: 1px solid #252525;
  border-radius: 2px;
  background: #252525;
  color: #fff;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.guestbook-form .contact-field input[type="file"]::file-selector-button:hover {
  background: #e9dca0;
  color: #252525;
}

.guestbook-form .contact-field textarea {
  min-height: 56px;
}

.guestbook-form .contact-submit {
  min-height: 34px;
  font-size: 13px;
}

.contact-page.contact-page--solo {
  grid-template-columns: minmax(0, 560px);
  grid-template-areas: "contact";
  justify-content: center;
}
