:root {
    --receipt-bg: #fff;
    --ink-color: #2d3436;
    --paper-color: #fdfbf7;
    --highlight: #d63031;
}

body {
    background-color: #555;
    /* Dark background to pop the receipt */
    color: var(--ink-color);
    font-family: 'Courier Prime', monospace;
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 20px;
}

.app-container {
    width: 100%;
    max-width: 400px;
}

.back-link {
    color: #fff;
    text-decoration: none;
    margin-bottom: 20px;
    display: block;
}

header {
    text-align: center;
    color: #fff;
    margin-bottom: 20px;
}

header h1 {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 1.5rem;
    margin: 0;
}

header p {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Receipt Style */
.receipt-container {
    background: var(--receipt-bg);
    padding: 30px 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    /* Jagged Edge Top */
    clip-path: polygon(0% 10px, 5% 0%, 10% 10px, 15% 0%, 20% 10px, 25% 0%, 30% 10px, 35% 0%, 40% 10px, 45% 0%, 50% 10px, 55% 0%, 60% 10px, 65% 0%, 70% 10px, 75% 0%, 80% 10px, 85% 0%, 90% 10px, 95% 0%, 100% 10px,
            100% 100%, 0% 100%);
    margin-bottom: 50px;
}

/* Jagged Bottom via pseudo elem if needed, but simple margin is fine for now */

.receipt-header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 1px dashed #000;
    padding-bottom: 15px;
}

.receipt-header h2 {
    font-size: 2rem;
    margin: 0;
    letter-spacing: 2px;
}

.date {
    font-size: 0.8rem;
    color: #555;
}

.section {
    margin-bottom: 20px;
}

.section h3 {
    font-size: 1rem;
    border-bottom: 1px solid #000;
    padding-bottom: 5px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.sub-label {
    font-size: 0.7rem;
    color: #888;
    margin-top: -5px;
    margin-bottom: 10px;
    font-style: italic;
}

.input-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.input-row label {
    font-size: 0.9rem;
}

.input-row input {
    width: 80px;
    border: none;
    border-bottom: 1px dashed #aaa;
    text-align: right;
    font-family: 'Courier Prime', monospace;
    font-size: 1rem;
    background: transparent;
}

.input-row input:focus {
    outline: none;
    border-bottom: 1px solid #000;
}

.unit {
    font-size: 0.8rem;
    margin-left: 5px;
    width: 30px;
}

.divider {
    border-bottom: 1px dashed #ccc;
    margin: 15px 0;
}

.divider-double {
    border-bottom: 3px double #000;
    margin: 20px 0;
}

.btn-calculate {
    width: 100%;
    padding: 15px;
    background: #000;
    color: #fff;
    font-family: 'Courier Prime', monospace;
    font-size: 1.2rem;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
}

.btn-calculate:hover {
    background: #333;
}

/* Result */
.hidden {
    display: none;
}

.result-area {
    margin-top: 20px;
    animation: print 0.5s ease-out;
}

@keyframes print {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.final-result {
    text-align: center;
    margin: 20px 0;
    border: 2px solid #000;
    padding: 10px;
}

.final-result p {
    margin: 0;
    font-size: 0.8rem;
}

.final-result h1 {
    margin: 10px 0 0;
    font-size: 2.5rem;
}

.comparison {
    text-align: center;
    font-size: 0.9rem;
    background: #eee;
    padding: 10px;
    border-radius: 5px;
}

.receipt-footer {
    text-align: center;
    margin-top: 30px;
    font-size: 0.7rem;
    color: #888;
}

.receipt-footer p {
    margin: 2px;
}