:root { --fg: #1a1a1a; --muted: #666; --ok: #0a7a3a; --ng: #c0261d; --warn: #b86e00; --bg: #fafaf7; font-family: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; color: var(--fg); background: var(--bg); line-height: 1.6; }
main.narrow { max-width: 560px; margin: 0 auto; padding: 24px 16px 64px; }
h1 { font-size: 1.5rem; line-height: 1.3; } h1 small { font-size: 1rem; color: var(--muted); }
.note { font-size: .9rem; color: var(--muted); }
button { font: inherit; padding: .5em 1em; border-radius: 8px; border: 1px solid #333; background: #fff; cursor: pointer; }
button.big { font-size: 1.3rem; padding: .7em 1.2em; background: #111; color: #fff; }
input, select { font: inherit; padding: .4em; }
ul.slots { list-style: none; padding: 0; }
.slot { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid #ddd; }
.slot-time { font-size: 1.3rem; font-weight: bold; min-width: 4em; } .slot-left { color: var(--muted); min-width: 6em; }
.slot.closed { opacity: .5; } form.buy { display: flex; gap: 8px; margin-left: auto; }
.ticket { text-align: center; } .ticket-slot { font-size: 1.4rem; font-weight: bold; margin: 0; } .ticket-count { font-size: 1.2rem; }
.qr svg { width: min(80vw, 320px); height: auto; border: 1px solid #ddd; }
.ticket-code strong { font-family: ui-monospace, monospace; font-size: 1.4rem; letter-spacing: .1em; }
.ticket-status.ng, .ng strong { color: var(--ng); } .badge { background: #eee; border-radius: 4px; padding: 0 .4em; font-size: .9rem; }
/* 入口 */
.gate-body { background: #111; color: #fff; } main.gate { max-width: 720px; margin: 0 auto; padding: 8px; }
.gate-head { display: flex; gap: 12px; align-items: baseline; } .gate-head .who { color: #aaa; font-size: .8rem; } #clock { margin-left: auto; font-size: 1.4rem; }
.scanner { position: relative; text-align: center; } video { width: 100%; max-height: 38vh; object-fit: cover; background: #000; border-radius: 8px; }
.scanner button { position: absolute; inset: 0; margin: auto; width: 60%; height: 4em; }
.manual { display: flex; gap: 8px; margin: 8px 0; } .manual input { flex: 1; }
.result { border-radius: 12px; padding: 16px; min-height: 40vh; } .result .verdict { font-size: 3rem; font-weight: 900; margin: 0; line-height: 1.2; }
.result.idle { background: #333; } .result.ok { background: var(--ok); } .result.other_slot { background: var(--warn); }
.result.already_admitted, .result.refunded, .result.not_found { background: var(--ng); }
.result .detail { font-size: 1.2rem; margin: .3em 0; } .result .detail.big, .result .count { font-size: 1.6rem; font-weight: bold; }
.result .note-big { font-size: 1.4rem; background: rgba(0,0,0,.3); padding: .3em .6em; border-radius: 6px; display: inline-block; }
.admit-row { display: flex; gap: 8px; margin: 12px 0; } .count-select { font-size: 1.4rem; }
.result button.big { background: #fff; color: #111; } .result .next { margin-top: 16px; font-size: 1.2rem; }
.entries { font-size: .9rem; } .entries .undone { text-decoration: line-through; opacity: .7; } button.small { font-size: .8rem; padding: .1em .5em; }
/* 管理 */
main.admin { max-width: 1100px; margin: 0 auto; padding: 16px; } main.admin header { display: flex; gap: 12px; align-items: baseline; }
table { border-collapse: collapse; font-size: .9rem; } th, td { border: 1px solid #ccc; padding: 2px 6px; text-align: left; }
tr.over td { background: #fdd; } form.inline { display: inline-flex; gap: 4px; } form.inline input[type=number] { width: 5em; }
form.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; align-items: end; }
.check { border-left: 6px solid; padding: 4px 12px; } .check.ok { border-color: var(--ok); } .check.ng { border-color: var(--ng); background: #fff4f4; }
.flash { background: #fff7d6; padding: 8px; border-radius: 6px; } .mono { font-family: ui-monospace, monospace; } .small { font-size: .8rem; } .lookup { border: 1px solid #ccc; padding: 8px; margin: 8px 0; }
pre { white-space: pre-wrap; font-size: .8rem; }
main.print { padding: 8px; } main.print td.box { width: 3em; } tr.ng td { background: #eee; text-decoration: line-through; }
@media print { main.print { font-size: 10pt; } }
