:root { color-scheme: light dark; --line: #8884; --accent: #e4002b; --muted: #888; }
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.45 system-ui, sans-serif; }
main { max-width: 44rem; margin: auto; padding: 1.25rem; }
h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h2 { font-size: 1.05rem; margin: 0 0 .4rem; }
button, input { font: inherit; padding: .55rem .8rem; border: 1px solid var(--line); border-radius: .5rem; background: transparent; color: inherit; }
a.button { font: inherit; padding: .55rem .8rem; border-radius: .5rem; background: var(--accent); color: #fff; text-decoration: none; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: progress; }
button.primary, #sizes button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
button.link { border: 0; padding: 0; text-decoration: underline; color: var(--muted); }
input#count { width: 5rem; padding: .25rem .5rem; }
input#size { width: 7rem; }
label { display: block; margin-bottom: .35rem; }
.card label { display: inline; }
.row { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.card { flex: 1 1 15rem; border: 1px solid var(--line); border-radius: .75rem; padding: 1rem; }
.muted, .who { color: var(--muted); margin-top: 0; }
#message { min-height: 1.5em; }
#message.error { color: var(--accent); font-weight: 600; }
.vouchers { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; }
.qr { text-align: center; border: 1px solid var(--line); border-radius: .75rem; padding: 1rem; break-inside: avoid; }
.qr svg { display: block; width: 100%; max-width: 22rem; height: auto; margin: 0 auto .6rem; background: #fff; padding: .6rem; border-radius: .4rem; }
.qr strong { display: block; }
.qr .error { color: var(--accent); }
.qr .row { justify-content: center; margin: .5rem 0 0; }
.paid { color: #1a7f37; font-weight: 700; }
#orders { list-style: none; padding: 0; }
#orders li { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; border-top: 1px solid var(--line); }
@media print {
  #login, #maker, #history, #message, h1, .qr .row, .no-print { display: none !important; }
  .qr { border: 1px dashed #999; }
}
