@font-face {
    font-family: "Vazirmatn";
    src: url("fonts/Vazirmatn-VariableFont_wght.ttf") format("truetype");
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: "Lalezar";
    src: url("fonts/Lalezar-Regular.ttf") format("truetype");
    font-weight: 400;
    font-display: swap;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpath d='M30 4 L56 30 L30 56 L4 30 Z' fill='none' stroke='%23e8c58f' stroke-opacity='0.13' stroke-width='1'/%3E%3Ccircle cx='30' cy='30' r='2' fill='%23e8c58f' fill-opacity='0.16'/%3E%3C/svg%3E"),
        radial-gradient(ellipse at center, transparent 40%, rgba(40, 5, 5, 0.55) 100%),
        radial-gradient(circle at 20% 10%, rgba(255, 220, 180, 0.22), transparent 40%),
        linear-gradient(160deg, #7a1414 0%, #9b1c1c 45%, #5a0f0f 100%);
    background-attachment: fixed;
    font-family: "Vazirmatn", Tahoma, sans-serif;
    color: #5a1a1a;
    text-align: center;
    padding: 40px 16px 110px 16px;
}

h1, h2 {
    font-family: "Lalezar", "Vazirmatn", sans-serif;
    font-weight: 400;
    color: #9b1c1c;
}

h1 {
    font-size: 40px;
    margin: 0 0 16px 0;
}

.poem {
    max-width: 380px;
    margin: 0 auto 28px auto;
    color: #f7e3c4;
}

.poem-line {
    font-family: "Lalezar", "Vazirmatn", sans-serif;
    font-size: 22px;
    line-height: 2;
    margin: 0;
}

.poem-author {
    font-size: 14px;
    color: #e8c58f;
    margin: 6px 0 0 0;
}

.card {
    background: #fffaf2;
    border: 3px double #9b1c1c;
    border-radius: 16px;
    padding: 32px 24px;
    max-width: 380px;
    margin: 0 auto 24px auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.sub {
    color: #9b1c1c;
    font-weight: 700;
    font-size: 18px;
}

.letter {
    background: #fdf3e3;
    border: 1px dashed #c9a98a;
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}

.letter-text {
    font-size: 17px;
    line-height: 1.9;
    margin: 0 0 8px 0;
}

.letter-from {
    color: #9b1c1c;
    font-weight: 700;
    margin: 0;
    font-size: 14px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

input, textarea {
    font-family: "Vazirmatn", Tahoma, sans-serif;
    font-size: 15px;
    padding: 12px;
    border: 1px solid #c9a98a;
    border-radius: 10px;
    background: #fffdf9;
    color: #5a1a1a;
    width: 100%;
    box-sizing: border-box;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #9b1c1c;
}

.footer-note {
    color: #e8c58f;
    font-size: 14px;
    margin-top: 8px;
}

.submit-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 16px;
    background: rgba(90, 15, 15, 0.92);
    border-top: 1px solid #e8c58f;
    z-index: 10;
}

.submit-bar button {
    display: block;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    font-family: "Vazirmatn", Tahoma, sans-serif;
    font-size: 17px;
    font-weight: 700;
    padding: 14px;
    background: #e8c58f;
    color: #5a0f0f;
    border: none;
    border-radius: 12px;
    cursor: pointer;
}

.submit-bar button:hover {
    background: #f3d6a6;
}
body::before {
    content: "";
    position: fixed;
    top: 8px;
    right: 8px;
    bottom: 8px;
    left: 8px;
    border: 3px double rgba(232, 197, 143, 0.55);
    border-radius: 14px;
    pointer-events: none;
    z-index: 0;
}

.poem::before {
    content: "❦";
    display: block;
    color: #e8c58f;
    font-size: 24px;
    margin-bottom: 8px;
}
.letter {
    position: relative;
    background:
        repeating-linear-gradient(
            to bottom,
            transparent 0,
            transparent 31px,
            rgba(155, 28, 28, 0.12) 31px,
            rgba(155, 28, 28, 0.12) 32px
        ),
        #fdf3e3;
    border: 1px solid #e0c9a6;
    border-radius: 6px;
    padding: 22px 18px 16px 18px;
    margin-top: 18px;
    transform: rotate(-1.2deg);
    box-shadow: 0 6px 14px rgba(90, 15, 15, 0.18);
}

.letter::before {
    content: "”";
    position: absolute;
    top: -6px;
    right: 12px;
    font-family: "Lalezar", serif;
    font-size: 64px;
    line-height: 1;
    color: rgba(155, 28, 28, 0.18);
}

.letter-text {
    position: relative;
    line-height: 32px;
    font-size: 17px;
    margin: 0 0 10px 0;
}

.letter-from {
    font-family: "Lalezar", "Vazirmatn", sans-serif;
    font-weight: 400;
    font-size: 17px;
    color: #9b1c1c;
    text-align: left;
}
.error {
    background: #fde8e8;
    border: 1px solid #d9534f;
    color: #8a1c1c;
    border-radius: 10px;
    padding: 10px 12px;
    margin: 0;
    font-size: 15px;
}