* { box-sizing: border-box; }
:root {
  color-scheme: light;
  color: #463428;
  font: 16px/1.55 Inter, "Noto Sans Georgian", system-ui, sans-serif;
  --title: "Cormorant Garamond", Baskerville, "Noto Serif Georgian", Georgia, serif;
}
body { margin: 0; }
.auto-height { overflow: hidden; }
.standalone { min-height: 100vh; padding: clamp(15px, 5vw, 64px); background: #f8f3ed; }
.letter {
  position: relative; isolation: isolate; max-width: 820px; margin: auto;
  padding: clamp(30px, 7vw, 62px) clamp(25px, 8vw, 74px);
  border: 1px solid #deccb5; border-radius: 32px;
  background: radial-gradient(ellipse at top left, #fffdf9 5%, transparent 65%), linear-gradient(135deg,#fcf6ec,#fffaf4 60%,#f7ecdf);
}
.letter::before {
  content: ""; position: absolute; inset: 7px; z-index: -1; pointer-events: none;
  border: 1px solid #d2bfa65a; border-radius: 26px;
}
.letter-head { text-align: center; }
h1 { margin: 0; color: #483426; font: 500 clamp(34px, 6vw, 56px)/1.13 var(--title); text-wrap: balance; overflow-wrap: break-word; }
.heart-rule { display: flex; align-items: center; gap: 10px; width: min(55%, 220px); margin: 11px auto 15px; color: #9c724d; font: 19px/1 Georgia,serif; }
.heart-rule::before,.heart-rule::after { content: ""; height: 1px; flex: 1; background: #cdb18d; }
.letter-head p { max-width: 34rem; margin: 0 auto 24px; color: #624d3d; line-height: 1.65; text-wrap: pretty; }
fieldset { min-width: 0; border: 0; padding: 0; margin: 0 0 20px; }
legend { padding: 0 0 13px; color: #654c36; font: 500 21px/1.4 var(--title); }
.fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px 22px; }
.fields .field:first-child { grid-column: 1/-1; }
.field { display: grid; gap: 5px; min-width: 0; color: #4b3828; }
.field > span { font-size: 14px; font-weight: 600; }
input,textarea {
  display:block; width: 100%; padding: 9px 12px; font: inherit;
  color: #35271f; background: #fffdf9; border: 1px solid #bda78e; border-radius: 8px;
}
input { min-height: 44px; }
textarea { min-height: 112px; resize: vertical; }
.letter-send { display: flex; flex-direction: column; align-items: center; margin-top: 22px; text-align: center; }
.letter-send p { margin: 8px 0 0; font-size: 13px; color: #685545; }
button,.back {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 10px 25px; border: 1px solid #775033; border-radius: 100px;
  background: #724e35; color: #fffaf2; font: 550 16px/1.4 Inter, system-ui, sans-serif; text-decoration: none; cursor: pointer;
}
button:hover,.back:hover { background: #573b29; }
:focus-visible { outline: 3px solid #8a622a; outline-offset: 3px; }
.notice { margin: 18px 0; padding: 12px; border-left: 3px solid #935c34; background: #f4e4d3; }
.notice a { color: #623c24; text-underline-offset: 3px; }
.field-error { color:#892f1b; font-size:14px; }
[aria-invalid=true] { border-color:#892f1b; }
.reply { display:grid; align-content:center; }
.reply .letter { width: min(100%,650px); }
html:lang(ka) h1 { font-family: "Noto Serif Georgian", Georgia, serif; line-height: 1.35; }
@media(max-width:500px) {
  .fields { grid-template-columns: 1fr; gap: 12px; }
  .letter { padding: 28px 19px; border-radius: 23px; }
  .letter::before { border-radius: 17px; inset: 5px; }
  .letter-head p { font-size: 15px; }
}
