.jhw {
  --jhw-ink: #272521;
  --jhw-wine: #610301;
  --jhw-cream: #f3ead3;
  box-sizing: border-box;
  width: 100vw;
  min-height: max(820px, 100svh);
  margin-left: calc(50% - 50vw);
  color: var(--jhw-ink);
  background-color: #e8e7df;
  background-image: var(--jhw-background-image);
  background-position: center;
  background-repeat: repeat;
  background-size: min(1250px, 100vw) auto;
  overflow: hidden;
  position: relative;
}

.jhw--form,
.jhw--notes {
  width: 100%;
  min-height: 0;
  margin-left: 0;
}

.jhw--form {
  overflow: visible;
  background: transparent;
}

.jhw--notes {
  overflow: hidden;
  background: transparent !important;
}

.jhw--notes .jhw__wall-panel,
.jhw--notes .jhw__stage {
  background: transparent !important;
  background-image: none !important;
}

.jhw *,
.jhw *::before,
.jhw *::after {
  box-sizing: border-box;
}

.jhw__layout {
  display: grid;
  grid-template-columns: minmax(310px, 0.78fr) minmax(520px, 1.22fr);
  gap: clamp(24px, 4vw, 72px);
  width: min(1560px, 100%);
  min-height: max(820px, 100svh);
  margin: 0 auto;
  padding: clamp(90px, 9vw, 150px) clamp(24px, 5vw, 84px) clamp(56px, 7vw, 100px);
}

.jhw__form-panel {
  align-self: center;
  width: 100%;
  max-width: 520px;
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid rgba(39, 37, 33, 0.16);
  border-radius: 2px;
  background: rgba(247, 244, 234, 0.76);
  box-shadow: 0 28px 70px rgba(52, 46, 38, 0.12);
  backdrop-filter: blur(5px);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.jhw__form-panel input,
.jhw__form-panel textarea,
.jhw__form-panel select,
.jhw__form-panel button {
  font-family: "IBM Plex Mono", ui-monospace, monospace !important;
}

.jhw--form .jhw__form-panel {
  max-width: none;
  margin: 0 auto;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.jhw__form-panel .klr-form,
.jhw__form-panel .klr-fields {
  width: 100%;
}

.jhw__form-panel .klr-heading {
  margin: 0 0 10px;
  color: var(--jhw-wine);
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 0.98;
}

.jhw__form-panel .klr-subheading {
  margin-bottom: 24px;
  color: var(--jhw-ink);
}

.jhw__form-panel .klr-row,
.jhw__form-panel .klr-consent,
.jhw__form-panel .klr-profile-fields {
  margin-top: 14px;
}

.jhw__form-panel .klr-row label,
.jhw__form-panel .klr-consent label {
  color: var(--jhw-ink);
}

.jhw__form-panel .klr-row label > span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.jhw__form-panel .klr-row input,
.jhw__form-panel .klr-row textarea {
  min-height: 48px;
  color: var(--jhw-ink) !important;
  border-color: rgba(39, 37, 33, 0.42) !important;
  border-radius: 0 !important;
  background: rgba(255, 255, 255, 0.54) !important;
  box-shadow: none !important;
}

.jhw__form-panel .klr-row textarea {
  min-height: 112px;
  resize: vertical;
}

.jhw__form-panel .klr-consent {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: 8px;
  font-size: 0.82rem;
}

.jhw__form-panel .klr-consent label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  white-space: nowrap;
}

.jhw__form-panel .klr-form button[type="submit"] {
  width: 100% !important;
  margin-top: 20px;
  color: var(--jhw-cream) !important;
  border: 1px solid var(--jhw-wine) !important;
  border-radius: 0 !important;
  background: var(--jhw-wine) !important;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.jhw__form-panel .klr-form button[type="submit"]:hover,
.jhw__form-panel .klr-form button[type="submit"]:focus-visible {
  color: var(--jhw-wine) !important;
  background: var(--jhw-cream) !important;
}

.jhw__form-panel .klr-status[data-ok="1"] {
  color: #31552f;
}

.jhw__form-panel .klr-status[data-ok="0"] {
  color: var(--jhw-wine);
}

.jhw__form-panel .klr-privacy {
  color: rgba(39, 37, 33, 0.72);
}

.jhw__wall-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.jhw--notes .jhw__wall-panel {
  min-height: 760px;
  padding: clamp(24px, 3vw, 42px);
}

.jhw__wall-heading {
  min-height: 76px;
  padding: 0 16px 16px;
  text-align: center;
}

.jhw__wall-heading h2 {
  margin: 0;
  color: var(--jhw-wine);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: clamp(1.45rem, 2.2vw, 2.3rem);
  letter-spacing: 0.02em;
}

.jhw__wall-heading p {
  max-width: 640px;
  margin: 8px auto 0;
  color: rgba(39, 37, 33, 0.68);
  font-size: 0.84rem;
}

.jhw__stage {
  position: relative;
  flex: 1;
  min-height: 650px;
  overflow: hidden;
  border: 1px solid rgba(76, 72, 62, 0.09);
  box-shadow: none;
  touch-action: none;
}

.jhw__empty {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(320px, 70%);
  margin: 0;
  color: rgba(39, 37, 33, 0.45);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.9rem;
  text-align: center;
  transform: translate(-50%, -50%);
}

.jhw-note {
  --jhw-note-color: #f3df79;
  --jhw-note-rotation: 0deg;
  position: absolute;
  z-index: 2;
  display: grid;
  width: clamp(138px, 13vw, 188px);
  aspect-ratio: 1 / 0.92;
  place-items: center;
  padding: clamp(18px, 2.2vw, 28px) clamp(14px, 1.8vw, 22px) 14px;
  overflow: hidden;
  color: #2f2c27;
  border: 0;
  border-radius: 1px;
  background: var(--jhw-note-color);
  box-shadow: 0 13px 18px rgba(44, 40, 33, 0.2), 0 3px 5px rgba(44, 40, 33, 0.12);
  font-family: "Reenie Beanie", "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive;
  font-size: clamp(1.05rem, 1.45vw, 1.35rem);
  line-height: 1.35;
  text-align: left;
  cursor: grab;
  opacity: 0;
  transform: rotate(var(--jhw-note-rotation)) scale(0.96);
  transform-origin: 50% 10%;
  transition: opacity 420ms ease, transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 180ms ease;
  user-select: none;
  -webkit-user-select: none;
}

.jhw-note::before {
  position: absolute;
  top: -3px;
  left: 50%;
  width: 48%;
  height: 19px;
  background: rgba(242, 230, 203, 0.62);
  box-shadow: 0 1px 2px rgba(56, 51, 42, 0.08);
  content: "";
  transform: translateX(-50%) rotate(-1deg);
}

.jhw-note.is-positioned {
  opacity: 1;
  transform: rotate(var(--jhw-note-rotation)) scale(1);
}

.jhw-note.is-entering {
  animation: jhw-note-in 620ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.jhw-note.is-dragging {
  cursor: grabbing;
  box-shadow: 0 24px 34px rgba(44, 40, 33, 0.28), 0 7px 10px rgba(44, 40, 33, 0.14);
  transform: rotate(0deg) scale(1.045);
  transition: box-shadow 120ms ease, transform 120ms ease;
}

.jhw-note:hover,
.jhw-note:focus-visible {
  z-index: 18;
  outline: 2px solid rgba(97, 3, 1, 0.7);
  outline-offset: 3px;
  box-shadow: 0 20px 30px rgba(44, 40, 33, 0.25), 0 5px 8px rgba(44, 40, 33, 0.14);
  transform: rotate(0deg) scale(1.035);
}

.jhw-note__text {
  display: -webkit-box;
  width: 100%;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
}

.jhw__dialog {
  width: min(460px, calc(100vw - 36px));
  min-height: 300px;
  padding: 64px clamp(30px, 6vw, 60px) 44px;
  color: #2f2c27;
  border: 0;
  border-radius: 2px;
  background: var(--jhw-dialog-color, #f3df79);
  box-shadow: 0 36px 90px rgba(20, 18, 15, 0.42);
  font-family: "Reenie Beanie", "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive;
  font-size: clamp(1.2rem, 3vw, 1.65rem);
  line-height: 1.5;
}

.jhw__dialog::before {
  position: absolute;
  top: -5px;
  left: 50%;
  width: 45%;
  height: 28px;
  background: rgba(242, 230, 203, 0.7);
  content: "";
  transform: translateX(-50%) rotate(-1deg);
}

.jhw__dialog::backdrop {
  background: rgba(35, 31, 26, 0.52);
  backdrop-filter: blur(3px);
}

.jhw__dialog p {
  margin: 0;
  white-space: pre-wrap;
}

.jhw__dialog-close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 38px;
  height: 38px;
  padding: 0;
  color: #2f2c27;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.34);
  font: 700 26px/1 sans-serif;
  cursor: pointer;
}

.jhw__admin-warning {
  color: var(--jhw-wine);
  font-weight: 700;
}

@keyframes jhw-note-in {
  0% { opacity: 0; transform: translateY(-26px) rotate(calc(var(--jhw-note-rotation) - 4deg)) scale(1.12); }
  65% { opacity: 1; transform: translateY(4px) rotate(var(--jhw-note-rotation)) scale(0.985); }
  100% { opacity: 1; transform: translateY(0) rotate(var(--jhw-note-rotation)) scale(1); }
}

/* Fill the available desktop viewport below the Cornerstone heading and padding. */
@media (min-width: 961px) and (min-height: 901px) {
  .jhw--notes .jhw__wall-panel {
    height: calc(100svh - 144px);
    min-height: 760px;
  }
}

/* Keep the full form and note canvas inside common laptop-height viewports. */
@media (min-width: 961px) and (max-height: 900px) {
  .jhw--form .jhw__form-panel {
    padding: clamp(16px, 2.5vh, 24px) 24px;
  }

  .jhw__form-panel .klr-subheading {
    margin-bottom: 8px;
  }

  .jhw__form-panel .klr-row,
  .jhw__form-panel .klr-consent,
  .jhw__form-panel .klr-profile-fields {
    margin-top: 6px;
    margin-bottom: 6px;
  }

  .jhw__form-panel .klr-row label > span {
    margin-bottom: 4px;
    font-size: 0.76rem;
  }

  .jhw__form-panel .klr-row input {
    min-height: 40px;
  }

  .jhw__form-panel .klr-row textarea {
    min-height: 86px;
  }

  .jhw__form-panel .klr-consent {
    gap: 4px;
    font-size: 0.76rem;
  }

  .jhw__form-panel .klr-form button[type="submit"] {
    margin-top: 8px;
    padding-block: 9px !important;
  }

  .jhw__form-panel .klr-turnstile,
  .jhw__form-panel .klr-status,
  .jhw__form-panel .klr-privacy {
    margin-top: 6px !important;
  }

  .jhw__form-panel .klr-privacy {
    font-size: clamp(0.66rem, 1.3vh, 0.74rem) !important;
    line-height: 1.25 !important;
  }

  .jhw--notes .jhw__wall-panel {
    height: calc(100svh - 144px);
    min-height: 0 !important;
    max-height: 760px;
    padding-block: 0;
  }

  .jhw__wall-heading {
    min-height: 52px;
    padding-bottom: 8px;
  }

  .jhw__wall-heading p {
    margin-top: 4px;
    font-size: 0.76rem;
  }

  .jhw--notes .jhw__stage {
    min-height: 0 !important;
  }

  .jhw-note {
    width: clamp(118px, 10vw, 150px);
    padding: 16px 13px 12px;
    font-size: clamp(1rem, 1.25vw, 1.18rem);
  }
}

@media (max-width: 960px) {
  .jhw__layout {
    grid-template-columns: 1fr;
    padding-top: 98px;
  }

  .jhw__form-panel {
    justify-self: center;
  }

  .jhw__stage {
    min-height: 720px;
  }

  .jhw-note {
    width: clamp(128px, 25vw, 176px);
  }
}

@media (max-width: 560px) {
  .jhw__layout {
    gap: 40px;
    padding: 82px 14px 40px;
  }

  .jhw__form-panel {
    padding: 24px 18px;
  }

  .jhw--notes .jhw__wall-panel {
    min-height: 720px;
    padding: 24px 12px 12px;
  }

  .jhw__wall-heading {
    padding-inline: 8px;
  }

  .jhw__stage {
    min-height: 680px;
  }

  .jhw-note {
    width: clamp(118px, 37vw, 154px);
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jhw-note,
  .jhw-note.is-entering {
    animation: none;
    transition: none;
  }
}
