/* Signature wall: the full-page wall, the preview on the main page, and the sign form.
   Black hand-lettering on off-white paper; the ink and paper colours match js/wall.js. */
:root {
  --wall-paper: #f6f2e8;
  --wall-ink: #15130f;
  --wall-ui: rgba(21, 19, 15, 0.82);
}

.wall-body {
  margin: 0;
  overflow: hidden;
  background: var(--wall-paper);
  color: var(--wall-ink);
  font-family: "Patrick Hand", system-ui, sans-serif;
  overscroll-behavior: none;
}
.wall-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;                 /* the view handles drag and pinch itself */
  cursor: grab;
  display: block;
}
.wall-canvas:active { cursor: grabbing; }

.wall-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px max(12px, env(safe-area-inset-left)) 10px max(12px, env(safe-area-inset-right));
  background: linear-gradient(rgba(246, 242, 232, 0.96), rgba(246, 242, 232, 0));
}
.wall-bar__back { color: var(--wall-ui); text-decoration: none; font-size: 17px; }
.wall-bar__back:hover { text-decoration: underline; }
.wall-bar__title {
  margin: 0 auto 0 0;
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: clamp(22px, 3.4vw, 32px);
}
.wall-zoom {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: grid;
  gap: 8px;
}
.wall-zoom button, .wall-zoom a {
  width: 44px; height: 44px;
  border: 1px solid rgba(21, 19, 15, 0.25);
  border-radius: 50%;
  background: rgba(246, 242, 232, 0.9);
  color: var(--wall-ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.wall-zoom button[data-active="true"] { background: var(--wall-ink); color: var(--wall-paper); }
.wall-hint, .wall-pending {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(246, 242, 232, 0.86);
  color: var(--wall-ui);
  font-size: 15px;
  text-align: center;
  max-width: min(92vw, 520px);
}
.wall-hint { bottom: max(18px, env(safe-area-inset-bottom)); transition: opacity 0.8s ease; }
.wall-hint.is-faded { opacity: 0; }
.wall-pending { top: 58px; border: 1px dashed rgba(21, 19, 15, 0.45); }

/* ---------------------------------------------------------------- the sign form */
.gb-button {
  padding: 10px 18px;
  border: 1px solid rgba(21, 19, 15, 0.8);
  border-radius: 2px;
  background: var(--wall-ink);
  color: #f7f4ec;
  font: 600 15px/1 system-ui, sans-serif;
  letter-spacing: 0.04em;
  cursor: pointer;
  min-height: 44px;
}
.gb-button:hover { background: #2a2620; }
.gb-button--quiet { background: transparent; color: var(--wall-ink); }
.gb-button[disabled] { opacity: 0.6; cursor: default; }

.gb-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(14, 12, 10, 0.55);
}
.gb-modal__sheet {
  width: min(460px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 22px;
  border-radius: 4px;
  background: var(--wall-paper);
  box-shadow: 0 24px 70px rgba(10, 10, 12, 0.45);
}
.gb-modal__title { margin: 0 0 4px; font-family: "Caveat", cursive; font-weight: 700; font-size: 34px; }
.gb-modal__note { margin: 0 0 16px; color: rgba(21, 19, 15, 0.7); font: 400 14px/1.45 system-ui, sans-serif; }
.gb-field { display: block; margin-bottom: 14px; }
.gb-field__label { display: block; margin-bottom: 4px; font: 600 13px/1 system-ui, sans-serif; letter-spacing: 0.06em; text-transform: uppercase; }
.gb-field__input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(21, 19, 15, 0.35);
  border-radius: 2px;
  background: #fffdf8;
  color: var(--wall-ink);
  font: 400 17px/1.4 "Patrick Hand", system-ui, sans-serif;
  resize: vertical;
}
.gb-field__input:focus-visible { outline: 2px solid rgba(21, 19, 15, 0.6); outline-offset: 1px; }
.gb-field__count { display: block; margin-top: 4px; color: rgba(21, 19, 15, 0.6); font: 400 12px/1 system-ui, sans-serif; }
.gb-modal__error { margin: 0 0 12px; color: #8c2f2f; font: 500 14px/1.4 system-ui, sans-serif; }
.gb-modal__actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ---------------------------------------------------------------- preview on the main page */
/* The guestbook placeholder becomes the live preview: no dashed stripes, canvas fills the area. */
.gb-slot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 260px;
  background: none !important;
  border: 0 !important;
}
.gb-slot .gb-preview { flex: 1 1 auto; }
.gb-preview { position: relative; display: block; width: 100%; height: 100%; min-height: 220px; border: 0; padding: 0; background: none; cursor: pointer; }
.gb-preview__canvas { display: block; width: 100%; height: 100%; min-height: 220px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(21,19,15,.16); }
.gb-preview__footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.gb-preview__link { color: rgba(21, 19, 15, 0.8); font: 400 15px/1 "Patrick Hand", system-ui, sans-serif; }
@media (prefers-reduced-motion: reduce) { .wall-hint { transition: none; } }

@media (max-width: 460px) {
  .wall-bar__title { display: none; }          /* the Sign button owns the bar on a narrow phone */
}
