@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Libre+Baskerville:wght@700&display=swap');

:root { --ink: #192127; --muted: #657078; --line: #d9e0e1; --accent: #d94d3f; --soft: #f4f1ea; --paper: #fffdf9; }
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); font-family: 'DM Sans', sans-serif; background: #e8eceb; background-image: radial-gradient(#cdd6d4 0.8px, transparent 0.8px); background-size: 18px 18px; }
.page-shell { max-width: 1040px; margin: 0 auto; padding: 40px 24px 28px; }
.site-header { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 25px; }
.eyebrow { margin: 0 0 9px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; }
h1 { margin: 0; font: 700 clamp(28px, 5vw, 45px)/1.1 'Libre Baskerville', serif; letter-spacing: 0; }
.subtitle { margin: 11px 0 0; color: var(--muted); font-size: 15px; }
.header-tools { display: grid; gap: 9px; justify-items: end; }.date-picker { display: flex; align-items: end; gap: 8px; padding: 12px; border: 1px solid var(--line); background: rgba(255, 253, 249, .82); border-radius: 5px; }.date-picker label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }.date-picker input, .date-picker button, .print-actions button { min-height: 40px; border: 1px solid var(--line); border-radius: 4px; font: inherit; }.date-picker input { padding: 0 9px; color: var(--ink); background: white; }.date-picker button, .print-actions button { padding: 0 13px; color: white; background: var(--ink); font-weight: 700; cursor: pointer; }.print-actions { display: flex; gap: 8px; }.print-actions button:last-child { color: var(--ink); background: #e7d4a5; border-color: #d2bb80; }
.notice { margin: 0 0 15px; padding: 13px 16px; border-left: 4px solid var(--accent); background: var(--paper); font-size: 14px; }
.notice a { color: var(--accent); font-weight: 700; }
.error { color: #783128; }.demo-notice { border-left-color: #bf8b28; }
.result-panel { overflow: hidden; border: 1px solid #cbd4d2; background: var(--paper); box-shadow: 0 14px 35px rgba(25, 33, 39, .09); }
.panel-heading { display: flex; justify-content: space-between; align-items: center; padding: 15px 18px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }.panel-heading time { color: var(--accent); }
.live-dot { display: inline-block; width: 8px; height: 8px; margin-right: 9px; border-radius: 50%; background: #4d9b70; box-shadow: 0 0 0 4px #e3f1e8; }
.table-scroll { overflow-x: auto; }.result-table { width: 100%; min-width: 680px; border-collapse: collapse; table-layout: fixed; }.result-table th, .result-table td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }.result-table th:last-child, .result-table td:last-child { border-right: 0; }
.result-table thead th { width: 28%; padding: 15px 8px 13px; color: white; background: var(--ink); font-size: 16px; }.result-table thead th:first-child { width: 19%; background: #29383d; text-align: left; padding-left: 18px; }.result-table thead small { display: block; margin-top: 5px; color: #b9c9c8; font-size: 11px; font-weight: 500; }
.result-table tbody th { padding: 12px 8px; color: var(--muted); background: var(--soft); font-size: 12px; font-weight: 700; text-align: left; padding-left: 18px; }.numbers { padding: 8px 5px; font-weight: 600; font-size: 17px; letter-spacing: 1px; }.numbers span { display: block; line-height: 1.55; }.giai8, .giai7 { font-size: 27px; font-weight: 700; }.giai8 { color: var(--accent); }.giai1 { font-size: 21px; }.special-row th, .special-row td { border-bottom: 0; }.special-row th { color: #98611c; background: #f8edd7; }.special-row td { color: var(--accent); background: #fff8e9; font-size: 25px; font-weight: 700; }
footer { margin-top: 18px; color: var(--muted); font-size: 12px; text-align: center; }footer a { color: var(--ink); font-weight: 700; }
.print-copies { display: none; }
.print-title { display: none; }
.print-single { display: none; }
@media print { @page { size: A4 portrait; margin: 8mm; } body { background: white; }.page-shell { max-width: none; padding: 0; }.site-header, .notice, footer, .panel-heading { display: none !important; }.print-title { display: block; margin: 0 0 5mm; color: #192127; font-size: 18px; font-weight: 700; text-align: center; }.print-title span { display: block; margin-top: 2px; font-size: 11px; font-weight: 500; }.result-panel { border: 0; box-shadow: none; }.table-scroll { overflow: visible; }.result-table { min-width: 0; }.result-table thead th { padding: 14px 5px 11px; font-size: 15px; }.result-table tbody th { padding: 11px 5px; font-size: 11px; }.numbers { padding: 9px 3px; font-size: 23px; }.numbers span { line-height: 1.45; }.giai8, .giai7 { font-size: 32px; }.giai1 { font-size: 27px; }.special-row td { font-size: 30px; }.print-six .print-title, .print-six .result-panel { display: none; }.print-six .print-copies { display: grid; grid-template-columns: 1fr 1fr; gap: 5mm; }.print-six .print-copy { overflow: hidden; border: 1px solid #aeb7b5; }.print-six .print-brand { padding: 3px 2px; color: #192127; font-size: 8px; font-weight: 700; text-align: center; }.print-six .print-brand span { float: right; font-weight: 500; }.print-six .result-table thead th { padding: 4px 2px; font-size: 8px; }.print-six .result-table thead small { margin-top: 2px; font-size: 6px; }.print-six .result-table tbody th { padding: 3px 2px; font-size: 7px; }.print-six .numbers { padding: 2px 1px; font-size: 9px; letter-spacing: 0; }.print-six .numbers span { line-height: 1.25; }.print-six .giai8, .print-six .giai7 { font-size: 13px; }.print-six .giai1 { font-size: 11px; }.print-six .special-row td { font-size: 13px; } }
@media (max-width: 600px) { .page-shell { padding: 26px 12px 20px; }.site-header { display: block; }.header-tools { justify-items: stretch; }.date-picker { margin-top: 18px; }.date-picker input, .date-picker button { flex: 1; min-width: 0; }.print-actions button { flex: 1; }.result-table thead th { font-size: 14px; }.numbers { font-size: 15px; }.giai8, .giai7 { font-size: 24px; } }

@media print {
	.print-single { width: 100%; height: 277mm; padding: 2mm; border: 1px solid #111; }
	.ticket-heading { height: 24mm; border-color: #111; }
	.ticket-heading strong { padding-top: 2mm; font-size: 27px; line-height: 1.1; letter-spacing: .2px; }
	.ticket-heading em { margin-top: 1mm; font-size: 16px; line-height: 1.1; }
	.ticket-heading b { top: 1mm; right: 4mm; font-size: 28px; line-height: 1; }
	.ticket-heading b small { margin-top: 1mm; font-size: 20px; line-height: 1; }
	.ticket-source { height: 9mm; padding: 2mm 1mm; border-color: #111; font-size: 17px; line-height: 1; }
	.ticket-table { width: 100%; height: 218mm; border: 1px solid #111; }
	.ticket-table thead th { height: 12mm; padding: 1mm; font-size: 20px; line-height: 1.05; }
	.ticket-table thead small { margin-top: 1mm; font-size: 16px; line-height: 1; }
	.ticket-table tbody tr { height: 12mm; }
	.ticket-table tbody th { width: 10%; padding: 1mm 1px; font-size: 15px; line-height: 1; white-space: nowrap; }
	.ticket-table td { padding: 1mm 2px; font-size: 26px; line-height: 1.12; vertical-align: middle; }
	.ticket-table tr:nth-child(1) td { font-size: 51px; line-height: .95; }
	.ticket-table tr:nth-child(2) td { font-size: 30px; }
	.ticket-table tr:nth-child(3) { height: 31mm; }
	.ticket-table tr:nth-child(5) { height: 70mm; }
	.ticket-table tr:nth-child(6) { height: 21mm; }
	.ticket-table tr:nth-child(9) td, .ticket-special td { font-size: 34px !important; line-height: 1; }
	.ticket-footer { padding: 1.5mm; border-color: #111; font-size: 15px; line-height: 1; }
	.print-six .print-copies { gap: 4mm; }
	.print-six .print-copy { height: 91mm; padding: 1mm; border-color: #111; }
	.print-six .ticket-heading { height: 12mm; }
	.print-six .ticket-heading strong { padding-top: 1mm; font-size: 12px; }
	.print-six .ticket-heading em { margin-top: .5mm; font-size: 7px; }
	.print-six .ticket-heading b { top: 1mm; right: 1mm; font-size: 13px; }
	.print-six .ticket-heading b small { margin-top: .5mm; font-size: 8px; }
	.print-six .ticket-source { height: 5mm; padding: 1mm; font-size: 8px; }
	.print-six .ticket-table thead th { height: 7mm; padding: .5mm; font-size: 10px; }
	.print-six .ticket-table thead small { margin-top: .5mm; font-size: 8px; }
	.print-six .ticket-table { height: 70mm; }
	.print-six .ticket-table tbody tr { height: 6mm; }
	.print-six .ticket-table tbody th { padding: .5mm 1px; font-size: 8px; }
	.print-six .ticket-table td { padding: .5mm 1px; font-size: 13px; }
	.print-six .ticket-table tr:nth-child(1) td { font-size: 23px; }
	.print-six .ticket-table tr:nth-child(2) td { font-size: 15px; }
	.print-six .ticket-table tr:nth-child(3) { height: 17mm; }
	.print-six .ticket-table tr:nth-child(5) { height: 39mm; }
	.print-six .ticket-table tr:nth-child(6) { height: 12mm; }
	.print-six .ticket-table tr:nth-child(9) td, .print-six .ticket-special td { font-size: 16px !important; }
	.print-six .ticket-footer { padding: 1mm; font-size: 8px; }
}

@media print {
	.ticket-heading { height: auto; min-height: 18mm; padding: 1mm 0; }
	.ticket-heading strong { padding: 0; font-size: 16px; line-height: 1.1; }
	.ticket-heading em { margin: .5mm 0; font-size: 9px; line-height: 1.1; }
	.ticket-date { display: block; margin: .5mm 0 0; font-size: 9px; line-height: 1.1; }
	.ticket-date b { position: static; display: inline; margin: 0; font-size: 10px; text-decoration: none; }
	.ticket-source { height: 5mm; padding: 1mm; font-size: 8px; line-height: 1; }
	.ticket-table { height: auto; }
	.ticket-table thead th { height: 7mm; padding: .5mm; font-size: 10px; line-height: 1; }
	.ticket-table thead small { margin-top: .5mm; font-size: 8px; }
	.ticket-table tbody tr { height: auto; }
	.ticket-table tbody th { padding: 1mm 1px; font-size: 7px; line-height: 1; }
	.ticket-table td { padding: .65mm 1px; font-size: 9px; line-height: 1.05; }
	.ticket-table tr:nth-child(1) td { font-size: 20px; line-height: .9; }
	.ticket-table tr:nth-child(2) td { font-size: 12px; }
	.ticket-table tr:nth-child(3) td, .ticket-table tr:nth-child(5) td { font-size: 9px; line-height: 1.02; }
	.ticket-table tr:nth-child(9) td, .ticket-special td { font-size: 12px !important; line-height: 1; }
	.ticket-footer { padding: 1mm; font-size: 8px; line-height: 1; }
	.print-six .print-copies { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, auto); gap: 3mm 4mm; }
	.print-six .print-copy { width: 100%; height: 136mm; padding: 1mm; }
	.print-six .ticket-heading { min-height: 18mm; }
	.print-six .ticket-heading strong { font-size: 16px; }
	.print-six .ticket-heading em { font-size: 9px; }
	.print-six .ticket-date { font-size: 9px; }
	.print-six .ticket-date b { font-size: 10px; }
	.print-six .ticket-source { height: 5mm; font-size: 8px; }
	.print-six .ticket-table thead th { height: 7mm; font-size: 10px; }
	.print-six .ticket-table thead small { font-size: 8px; }
	.print-six .ticket-table tbody th { font-size: 7px; }
	.print-six .ticket-table td { font-size: 9px; }
	.print-six .ticket-table tr:nth-child(1) td { font-size: 20px; }
	.print-six .ticket-table tr:nth-child(2) td { font-size: 12px; }
	.print-six .ticket-table tr:nth-child(3) td, .print-six .ticket-table tr:nth-child(5) td { font-size: 9px; }
	.print-six .ticket-table tr:nth-child(9) td, .print-six .ticket-special td { font-size: 12px !important; }
	.print-six .ticket-footer { font-size: 8px; }
}

@media print {
	.print-six .ticket-table { height: auto; }
	.print-six .ticket-table tbody tr { height: auto; }
	.print-six .ticket-table tbody th { padding: 1mm 1px; font-size: 7px; }
	.print-six .ticket-table td { padding: .7mm 1px; font-size: 9px; line-height: 1.05; }
	.print-six .ticket-table tr:nth-child(1) td { font-size: 19px; line-height: .9; }
	.print-six .ticket-table tr:nth-child(2) td { font-size: 12px; }
	.print-six .ticket-table tr:nth-child(3) td { font-size: 9px; line-height: 1.02; }
	.print-six .ticket-table tr:nth-child(4) td { font-size: 9px; }
	.print-six .ticket-table tr:nth-child(5) td { font-size: 9px; line-height: 1.02; }
	.print-six .ticket-table tr:nth-child(6) td { font-size: 9px; line-height: 1.02; }
	.print-six .ticket-table tr:nth-child(7) td, .print-six .ticket-table tr:nth-child(8) td { font-size: 9px; }
	.print-six .ticket-table tr:nth-child(9) td, .print-six .ticket-special td { font-size: 12px !important; line-height: 1; }
}

@media print {
	.print-title { display: none !important; }
	.result-panel { display: none !important; }
	.print-single { display: block; border: 1px solid #222; padding: 1mm; }
	.ticket-heading { position: relative; height: 23mm; border: 1px solid #222; text-align: center; font-family: Arial, sans-serif; }
	.ticket-heading strong { display: block; padding-top: 2mm; font-size: 26px; }
	.ticket-heading em { display: block; font-size: 15px; }
	.ticket-heading b { position: absolute; top: 1mm; right: 3mm; font-size: 27px; text-decoration: underline; }
	.ticket-heading b small { display: block; font-size: 20px; font-weight: 400; text-decoration: none; }
	.ticket-source { height: 9mm; border: 1px solid #222; border-top: 0; font: italic 17px Arial, sans-serif; padding: 2mm; text-align: center; }
	.ticket-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-family: Arial, sans-serif; }
	.ticket-table th, .ticket-table td { border: 1px solid #222; text-align: center; }
	.ticket-table thead th { height: 11mm; font-size: 20px; }.ticket-table thead th:first-child { width: 10%; }.ticket-table thead small { display: block; font-size: 17px; font-weight: 400; }
	.ticket-table tbody th { width: 10%; font-size: 15px; font-weight: 400; }.ticket-table td { font-size: 26px; font-weight: 700; line-height: 1.2; }.ticket-table td span { display: block; }.ticket-table tr:nth-child(1) td { font-size: 52px; line-height: 1; }.ticket-table tr:nth-child(2) td { font-size: 30px; }.ticket-table tr:nth-child(9) td { font-size: 34px; }.ticket-special td { font-size: 35px !important; }.ticket-special th { font-weight: 700; }
	.ticket-footer { border: 1px solid #222; border-top: 0; padding: 1mm; font: 700 15px Arial, sans-serif; text-align: center; }
	.print-six .print-single { display: none; }.print-six .print-copies { display: grid; grid-template-columns: 1fr 1fr; gap: 5mm; }.print-six .print-copy { overflow: hidden; border: 1px solid #222; padding: 1mm; }.print-six .ticket-heading { height: 11mm; }.print-six .ticket-heading strong { padding-top: 1mm; font-size: 11px; }.print-six .ticket-heading em { font-size: 7px; }.print-six .ticket-heading b { top: 1mm; right: 1mm; font-size: 12px; }.print-six .ticket-heading b small { font-size: 8px; }.print-six .ticket-source { height: 5mm; padding: 1mm; font-size: 8px; }.print-six .ticket-table thead th { height: 6mm; font-size: 10px; }.print-six .ticket-table thead small { font-size: 8px; }.print-six .ticket-table tbody th { font-size: 8px; }.print-six .ticket-table td { font-size: 13px; }.print-six .ticket-table tr:nth-child(1) td { font-size: 24px; }.print-six .ticket-table tr:nth-child(2) td { font-size: 15px; }.print-six .ticket-table tr:nth-child(9) td, .print-six .ticket-special td { font-size: 17px !important; }.print-six .ticket-footer { font-size: 8px; }
}
