html, body {
    height: 100vh;
    overflow: hidden;
}

/* PAGE BACKGROUND */
.page-bg {
    background-color: #d8f6ed;
    background-image:
        radial-gradient(circle at 15% 85%, hsla(318,80%,97%,1) 19%, transparent 84%),
        radial-gradient(circle at 31% 1%, hsla(161,99%,84%,1) 12%, transparent 85%),
        radial-gradient(circle at 88% 87%, hsla(163,90%,78%,1) 4%, transparent 75%),
        radial-gradient(circle at 30% 27%, hsla(314,91%,59%,1) 14%, transparent 90%);
    background-blend-mode: normal;
    min-height: 100vh;
    height: 100vh;
    padding: 0;
    display: flex;
    margin: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* MAIN WRAPPER */
.receipt-container {
    width: 100%;
    max-width: 450px;
    max-height: 1000px;
}

/* RECEIPT PANEL */
.receipt {
    background: white;
    position: relative;
    padding: 24px 0 28px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    overflow: hidden;
}

/* PAPER OVERLAY TEXTURE */
.receipt::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("/static/paper.jpg") center center no-repeat;
    background-size: cover;
    opacity: 0.5;
    z-index: 0;
}

/* CONTENT LAYER */
.receipt > * {
    position: relative;
    z-index: 10;
}

/* HEADER */
.header-section {
    padding: 0 24px 16px;
    border-bottom: 2px dashed #bababa;
}

.title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.subtitle {
    text-align: center;
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* METADATA */
.meta {
    font-size: 12px;
    color: #555;
    padding: 16px 24px 0;
}

.meta .row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}



/* FORM SECTION */
.form-section {
    border-bottom: 2px dashed #c8c8c8;
    padding: 8px 24px;
    margin-bottom: 16px;
}

.textarea-wrapper {
    display: flex;
    justify-content: center;
}

textarea {
    width: 32ch;
    height: 100px;
    padding-top: 8px;
    padding: 5px;
    font-family: inherit;
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: none;
    outline: none;
    background-color: transparent;
    text-align: center;
}

textarea:focus {
    box-shadow: 0 0 0 2px #444;
    border-color: transparent;
}

/* CHAR COUNT */
.char-info {
    margin-top: 10px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
}

.char-info .max {
    color: #666;
}

.char-info .count.warn {
    color: #e0a800;
}

.char-info .count.danger {
    color: #d30000;
}

/* THANK YOU SECTION */
.thanks {
    padding: 0 24px;
    font-size: 11px;
    color: #555;
    margin-bottom: 24px;
    text-align: center;
    line-height: 1.8;
}

.thanks .bold {
    font-weight: bold;
}

/* BUTTON */
.send-btn {
    width: calc(100% - 48px);
    margin: 0 24px;
    padding: 12px;
    background: #111;
    border: none;
    color: white;
    font-size: 13px;
    font-weight: bold;
    border-radius: 4px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.15s;
}

.send-btn:hover {
    background: #38b2ac;
}

/* FOOTER */
.footer {
    text-align: center;
    font-size: 12px;
    color: #555;
    margin-top: 16px;
    opacity: 0.5;
    line-height: 0.5;
}

@media (max-width: 640px) {
    body {
        padding-bottom: 80px;
    }
}
        
.preview {
  min-height: 60px; /* keeps layout steady */
}