body {
	background-color: #e5e5e5;
	font-family: "Courier New", Courier, monospace;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 40px;
}

/* Simulating the A5 Paper */
#paper {
	background: white;
	width: 148mm;
	min-height: 210mm;
	padding: 15mm;
	box-shadow: 0 10px 30px rgba(0,0,0,0.15);
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
}

/* MOBILE ADJUSTMENTS */
@media (max-width: 600px) {
    body { padding: 10px; }
    #paper { 
        width: 100%; 
        padding: 15px; /* Switch to pixels for better mobile control */
        min-height: auto; /* Let it grow naturally on phone screens */
    }
    h1 { font-size: 1.1rem; }
    section h2 { font-size: 0.7rem; }
    p, pre { font-size: 0.75rem; }
        
    .controls {
        width: 100%;
        flex-direction: column; /* Stack buttons on top of each other */
    }
    button { width: 100%; }
}

header { text-align: center; margin-bottom: 25px; }
h1 { font-size: 1.3rem; margin: 0; text-transform: uppercase; font-weight: bold;}
.metadata { font-size: 0.75rem; color: #666; margin-top: 5px; }

section { margin-bottom: 18px; }
h2 { font-size: 0.85rem; color: #888; margin: 0 0 5px 0; font-weight: bold; border-bottom: 1px solid #eee; padding-bottom: 2px;}
p { font-size: 0.9rem; margin: 0; line-height: 1.4; color: #111; }

pre { 
font-size: 0.85rem; 
font-weight: 400; /* Forces standard weight */
line-height: 1.2; /* Tighter line height for the grid */
letter-spacing: -0.02em; /* Optional: tightens the horizontal gap */
background: white; 
padding: 12px; 
margin: 0; 
white-space: pre-wrap; 
color: #000; 
font-family: "Courier New", Courier, monospace; /* Ensures no fallback overrides */
}

#canvas-container {
	width: 100%;
	height: 250px; /* Fixed height to create a film-strip look */
	margin-top: auto;
	display: flex;
	justify-content: center;
	background: #fff;
}

button {
	margin-bottom: 20px;
	padding: 12px 24px;
	font-family: "Courier New", monospace;
	font-weight: bold;
	font-size: 1rem;
	cursor: pointer;
	background: #111;
	color: white;
	border: none;
	border-radius: 4px;
	transition: 0.2s;
	box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* UI Buttons */
.controls { margin-bottom: 25px; display: flex; gap: 10px; }
button { padding: 12px 24px; font-family: "Courier New", monospace; font-weight: bold; cursor: pointer; background: #fff; color: #000; border: 2px solid #fff; }
button:hover { background: #000; color: #fff; }
.btn-pdf { background: #333; color: #fff; border-color: #333; }
