@font-face {
  font-family: Bernard;
  src: url("bernard-mt-condensed-regular.ttf") format("truetype");
  font-display: swap;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
}

body {
  background: linear-gradient(#17150f55, #17150f88), url("peoples-bookshop-interior.jpg") center / cover no-repeat #22211d;
  color: #25221c;
  font: 1rem/1.3 system-ui, sans-serif;
  height: 100vh;
  height: 100dvh;
}

.kiosk {
  height: var(--visible-height, 100%);
  container-type: size;
  display: grid;
  place-items: center;
  padding: 12px;
}

.signup {
  position: relative;
  isolation: isolate;
  width: min(100%, 38rem);
  padding: clamp(20px, 4vw, 44px);
  background: #f1ede2;
  border-top: 5px solid #a32828;
  box-shadow: 0 12px 44px #17150f60;
}

.signup::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 16px;
  right: 18px;
  width: clamp(60px, 12vw, 110px);
  aspect-ratio: 1;
  background: url("peoples-bookshop-logo.jpg") center / contain no-repeat;
  mix-blend-mode: multiply;
  opacity: .23;
  transform: rotate(-13deg);
  pointer-events: none;
}

h1 {
  font: 400 clamp(1.95rem, 5vw, 3.4rem)/1 Bernard, Georgia, serif;
  margin: 0;
}

.signup-note {
  margin: 8px 0 20px;
}

.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}

.full-width { grid-column: 1 / -1; }
label { font-weight: 650; }
label small { font: inherit; font-weight: 400; }

input, button {
  display: block;
  width: 100%;
  min-height: 46px;
  border-radius: 3px;
  font: inherit;
}

input {
  margin-top: 4px;
  padding: 6px 10px;
  background: #fffdf8;
  color: inherit;
  border: 1px solid #797265;
}

button {
  margin-top: 16px;
  border: 0;
  background: #a32828;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button:disabled { opacity: .75; cursor: wait; }
:focus-visible { outline: 3px solid #244c74; outline-offset: 2px; }

.trap {
  position: fixed;
  inset-inline-start: -10000px;
}

.feedback {
  min-height: 2lh;
  margin: 8px 0 0;
  font-size: .9rem;
}

.feedback[data-state="success"] { white-space: pre-line; font-weight: 700; }

.feedback[data-state="error"] { color: #852323; }

@media (max-width: 420px) {
  .fields { gap: 9px; }
  .signup { padding: 16px; }
}

@container (max-height: 461px) {
  .signup { padding: 12px 20px 8px; }
  .signup::before { top: 8px; right: 14px; width: 60px; }
  h1 { font-size: 1.9rem; }
  .signup-note { margin: 4px 0 8px; }
  .fields { gap: 5px 12px; }
  input, button { min-height: 36px; }
  button { margin-top: 8px; }
  .feedback { margin-top: 4px; }
}

@container (max-height: 425px) and (min-width: 626px) {
  .signup { width: min(100%, 51rem); padding-block: 8px 4px; }
  .fields { row-gap: 3px; }
  .fields label {
    display: grid;
    grid-template-columns: minmax(6rem, max-content) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    font-size: .9rem;
  }
  .fields input { min-height: 32px; margin-top: 0; padding-block: 3px; font-size: 1rem; }
  .feedback { min-height: 1lh; }
}
