:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #12313c;
  background: #f8f4e9;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
button:focus-visible, input:focus-visible { outline: 3px solid #ee8e18; outline-offset: 3px; }
.brand { background: #f9aa23; }
.brand img, .admin-header img { display: block; width: 100%; max-height: 11vh; object-fit: contain; }
.board { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; background: #071e2b; color: #fff; }
.board-content { flex: 1; min-height: 0; overflow: hidden; padding: clamp(.4rem, 1vw, 1rem); }
.board-table { width: 100%; border-collapse: separate; border-spacing: 0 .12rem; table-layout: fixed; }
.board-table th { text-align: left; color: #f9aa23; font-size: clamp(1.05rem, 2vw, 2.2rem); padding: .25em .35em; white-space: nowrap; }
.board-table th:nth-child(1), .board-table th:nth-child(2) { width: 43%; }
.board-table th:nth-child(3) { width: 14%; text-align: center; }
.board-table td { background: #123544; font-size: clamp(1rem, min(2vw, 2.4vh), 2.3rem); padding: .2em .35em; overflow-wrap: anywhere; line-height: 1.1; }
.board-table td:first-child { border-radius: .35rem 0 0 .35rem; }
.board-table td:last-child { border-radius: 0 .35rem .35rem 0; }
.board-table .quantity { text-align: center; font-weight: 800; color: #ffd276; }
.board-table .empty { text-align: center; padding: 2rem; }
.person { display: flex; align-items: center; gap: .45em; min-width: 0; }
.person span { min-width: 0; overflow-wrap: anywhere; }
.person img { flex: 0 0 auto; width: clamp(2.5rem, 4vw, 4.5rem); height: clamp(2.5rem, 4vw, 4.5rem); object-fit: contain; border-radius: .3rem; }
.board footer { flex: 0 0 auto; display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 1rem; font-size: clamp(.9rem, 1.2vw, 1.3rem); color: #d4e2e4; }
@media (orientation: portrait) {
  .brand img { max-height: 9vh; }
  .board-table th:nth-child(1), .board-table th:nth-child(2) { width: 42%; }
  .board-table th:nth-child(3) { width: 16%; }
  .board-table th { font-size: clamp(1.05rem, 2.3vw, 1.9rem); }
  .board-table td { font-size: clamp(1.1rem, 3vw, 2.25rem); padding: .28em .3em; }
  .person img { width: clamp(2.5rem, 5vw, 4.5rem); height: clamp(2.5rem, 5vw, 4.5rem); }
}
.admin { max-width: 1100px; margin: auto; padding-bottom: 3rem; }
.admin-header { background: #f9aa23; }
.admin-header img { max-height: 85px; }
.admin-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; padding: 1rem clamp(1rem, 3vw, 2rem); }
.admin-heading h1 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.4rem); }
.admin-heading p { margin: .2rem 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 800; }
.admin-workspace { padding: 1rem clamp(1rem, 3vw, 2rem); }
.toolbar { display: grid; gap: 1rem; }
.search { display: grid; gap: .4rem; font-weight: 700; }
.search input, dialog input { width: 100%; min-height: 3.25rem; padding: .65rem .8rem; border: 2px solid #8aa2a6; border-radius: .55rem; background: #fff; color: #12313c; }
.actions, .dialog-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.actions button, .dialog-actions button { min-height: 3.25rem; min-width: 8rem; padding: .6rem 1rem; border: 2px solid #12313c; border-radius: .55rem; background: #fff; color: #12313c; font-weight: 750; }
.actions .primary, .dialog-actions .primary { background: #07344a; color: #fff; }
.status { min-height: 1.5rem; margin: 1rem 0; color: #365862; }
.status.error, .form-error { color: #a12423; }
.record-list { display: grid; gap: .5rem; }
.record { width: 100%; min-height: 4.6rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; text-align: left; padding: .8rem 1rem; border: 2px solid #c5d3d0; border-radius: .65rem; color: #12313c; background: #fff; }
.record[aria-selected="true"] { border-color: #07344a; background: #e3f2ed; box-shadow: inset .4rem 0 #07344a; }
.record-names { display: grid; gap: .2rem; }
.record-names strong { font-size: 1.17rem; overflow-wrap: anywhere; }
.record-counts { font-weight: 700; color: #365862; text-align: right; }
.empty { padding: 2rem; text-align: center; }
dialog { width: min(92vw, 30rem); max-height: 90vh; overflow: auto; border: 0; border-radius: .8rem; padding: 1.4rem; color: #12313c; box-shadow: 0 1rem 3rem #0005; }
dialog::backdrop { background: #061e29b3; }
dialog form, dialog .confirm { display: grid; gap: 1rem; }
dialog h2 { margin: 0; }
dialog label { display: grid; gap: .3rem; font-weight: 700; }
.dialog-actions { justify-content: flex-end; }
.form-error { min-height: 1.2rem; margin: 0; }
@media (max-width: 700px) {
  .admin-heading { display: block; }
  .actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .actions button { min-width: 0; padding: .5rem; }
  .record { align-items: start; flex-direction: column; gap: .4rem; }
  .record-counts { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
