:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  color: #471c2b;
  background: #310e20;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 44px);
  background: radial-gradient(ellipse at 50% 0%, #692740, #310e20 76%);
}

.letter {
  width: min(100%, 480px);
  padding: clamp(24px, 6vw, 48px);
  background: #fff5ef;
  border: 1px solid #f0c8c9;
  border-radius: 26px;
  box-shadow: 0 24px 70px #19020e75, inset 0 0 0 6px #fae4e1;
}

.seal {
  display: grid;
  place-items: center;
  width: 58px;
  aspect-ratio: 1;
  margin: 0 auto 18px;
  border: 3px double #e5a3ae;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, #ac4861, #79203a 72%);
  color: #fff3ef;
  box-shadow: 0 5px 12px #78243f40;
  font-size: 24px;
}

header { text-align: center; margin-bottom: 24px; }

h1, h2 { font-family: Georgia, serif; }
h1 { font-size: clamp(2.35rem, 9vw, 3.8rem); font-weight: 400; line-height: .99; margin: 0; letter-spacing: -.045em; }
h1 em { display: block; color: #952e49; }
header p { max-width: 30ch; margin: 15px auto 0; color: #714252; line-height: 1.5; }

.signature-header { display: flex; align-items: center; justify-content: space-between; font-size: .92rem; font-weight: 650; }
button { font: inherit; cursor: pointer; }
button:focus-visible { outline: 3px solid #9b3d57; outline-offset: 3px; }
.clear { min-height: 44px; padding: 0 6px; background: transparent; color: #842641; border: 0; }
.clear:disabled { color: #795a64; cursor: default; }

.signature-pad {
  position: relative;
  overflow: hidden;
  border: 1px solid #d6a2ad;
  border-radius: 14px;
  background: #fffbf8;
}

canvas { display: block; width: 100%; height: clamp(132px, 22svh, 190px); touch-action: none; cursor: crosshair; }
.signature-line { position: absolute; inset: auto 8% 26% 8%; border-bottom: 1px dashed #c99da7; pointer-events: none; }
.hint { margin: 9px 0 18px; color: #714252; font-size: .875rem; }
.hint.error { color: #9b173c; font-weight: 650; }

.primary {
  width: 100%;
  min-height: 52px;
  padding: 12px;
  border: 0;
  border-radius: 12px;
  background: #842641;
  color: #fff6f1;
  font-weight: 650;
  box-shadow: 0 5px 12px #79203a35;
}

.primary:hover { background: #6d1b33; }
.primary span { margin-inline-start: 6px; color: #f4bdcb; }
.draft { color: #714252; font-size: .875rem; }
.clause { padding: 18px; border: 1px solid #e8bec5; border-radius: 14px; background: #fffbf8; }
.clause h2 { margin: 0; font-size: 1.35rem; }
.clause p { margin: 8px 0 0; line-height: 1.55; }
.signed { margin: 18px 0 0; text-align: center; }
.signed img { display: block; width: 100%; border-bottom: 1px dashed #c99da7; }
.signed p { margin: 8px 0 0; color: #714252; font-size: .875rem; }


#contract-music { display: block; width: 100%; height: 44px; }

.phone-label { display: block; margin-bottom: 8px; font-size: .92rem; font-weight: 650; }
#phone {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #d6a2ad;
  border-radius: 12px;
  margin-bottom: 4px;
  background: #fffbf8;
  color: inherit;
  font: inherit;
}
#phone:focus-visible { outline: 2px solid #9b3d57; outline-offset: 2px; }
#phone[aria-invalid="true"] { border-color: #9b173c; }
#personal-contract { overflow-wrap: anywhere; line-height: 1.6; margin-top: 16px; }
#personal-contract p { white-space: pre-line; }
#personal-contract h2 { margin: 24px 0 10px; font-weight: 700; line-height: 1.25; }
#personal-contract ol { margin: 0; padding-inline-start: 1.55em; }
#personal-contract li + li { margin-top: 10px; }
#personal-contract li::marker { font-weight: 700; color: #842641; }
.primary:disabled { opacity: .75; cursor: wait; }
