:root {
  font-family: Inter, 'Helvetica Neue', Arial, sans-serif;
  color: #1b332c;
  background: #f4f5ef;
  --pine: #174a38;
  --paper: #fffef9;
  --line: #d9ded1;
  --mute: #58695e;
  --lime: #dceba3;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
[hidden] {
  display: none !important;
}
button,
select {
  cursor: pointer;
}
button {
  padding: 0.75rem 1rem;
  border: 1px solid var(--pine);
  border-radius: 7px;
  background: var(--pine);
  color: #fff;
  font-weight: 650;
}
button:hover {
  filter: brightness(0.92);
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #9cba5c;
  outline-offset: 2px;
}
.secondary {
  color: var(--pine);
  background: transparent;
  border-color: #b8c6b8;
}
.link {
  border: none;
  background: transparent;
  color: var(--pine);
  padding: 0.4rem;
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}
.primary {
  background: var(--pine);
  color: white;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
.art-word {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 500;
}
h1 {
  font-size: clamp(2.3rem, 4vw, 3.7rem);
  letter-spacing: -0.05em;
  line-height: 1.05;
}
h2 {
  font-size: 1.7rem;
  letter-spacing: -0.035em;
}
p {
  line-height: 1.55;
  margin: 0.7rem 0;
}
.eyebrow {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mute);
}
.layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 100vh;
}
aside {
  background: #183f32;
  color: #eff5e8;
  padding: 27px 17px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.brand,
.art-sign {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.brand strong,
.art-sign span {
  font-family: Georgia, serif;
  font-size: 1.3rem;
  font-weight: 500;
}
.mark {
  width: 39px;
  height: 39px;
}
.brand .mark,
.art-sign .mark {
  border: 1px solid #769481;
  border-radius: 10px;
}
aside > .eyebrow {
  color: #b9cbbb;
  margin-top: 30px;
  padding: 0 10px;
}
nav {
  display: grid;
  gap: 5px;
}
.nav {
  border: none;
  background: transparent;
  color: #e4ede4;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 0.7rem;
  font-weight: 520;
}
.nav span {
  width: 20px;
  font-size: 1.25rem;
}
.chosen {
  background: var(--lime);
  color: #193d2d;
}
.sidefoot {
  margin-top: auto;
  border-top: 1px solid #466853;
  padding: 0.9rem 0.4rem 0;
  display: grid;
  gap: 0.4rem;
}
.sidefoot span,
small {
  font-size: 0.78rem;
}
.sidefoot span {
  color: #c6d9c9;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
  border-bottom: 1px solid var(--line);
  padding: 14px clamp(16px, 3.5vw, 56px);
  background: #fafbf5;
}
.session,
.actions,
.inline,
.paper-tools {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.session {
  font-size: 0.8rem;
}
.live,
.offline,
.tag {
  font-size: 0.75rem;
  font-weight: 650;
  border-radius: 99px;
  padding: 0.36rem 0.65rem;
  display: inline-block;
}
.live,
.green {
  background: #dfecd8;
  color: #27583b;
}
.offline,
.amber {
  background: #fff0cd;
  color: #775019;
}
select,
input {
  border: 1px solid #bfcabc;
  color: #20392e;
  background: white;
  border-radius: 6px;
  padding: 0.72rem 0.8rem;
  min-width: 0;
}
article {
  margin: 0 auto;
  padding: clamp(22px, 4vw, 63px) clamp(16px, 3.5vw, 56px);
  max-width: 1500px;
}
.title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}
.title .eyebrow {
  margin-bottom: 0.65rem;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 1.5rem;
}
.metrics section,
.panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  padding: clamp(16px, 2vw, 30px);
}
.metrics section:first-child {
  background: #e7edd8;
}
.metrics span {
  font-size: 0.85rem;
  color: #415648;
}
.metrics strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 2.5rem;
  font-weight: 500;
  margin-top: 0.8rem;
}
.metrics small {
  font: 600 0.8rem Arial;
}
.panel {
  margin-bottom: 1rem;
}
.panel h2 {
  margin-bottom: 1.2rem;
}
.empty {
  padding: 1.4rem 0;
  color: var(--mute);
}
.scroll {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
td,
th {
  padding: 0.85rem 0.55rem;
  border-bottom: 1px solid var(--line);
}
th {
  color: var(--mute);
  font-size: 0.75rem;
}
.record small,
td small,
.ticket-line small {
  display: block;
  margin-top: 0.3rem;
  color: var(--mute);
}
.tag {
  background: #e5ebdf;
}
.tag.green {
  background: #dbeed6;
}
.tag.amber {
  background: #fff0cd;
}
.record {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding: 1rem 0;
  overflow-wrap: anywhere;
}
.record > div:last-child {
  text-align: right;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0 1rem;
}
label {
  display: grid;
  gap: 0.4rem;
  margin: 0.75rem 0;
  font-size: 0.85rem;
  font-weight: 600;
}
.piece {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 0 1rem;
  padding: 1rem;
  min-width: 0;
}
.piece legend {
  color: var(--pine);
  font-weight: 650;
  padding: 0 0.4rem;
}
.summary {
  align-self: center;
  font-weight: 600;
}
.inline {
  align-items: end;
  margin-bottom: 1.2rem;
}
.inline label {
  margin: 0;
}
.actions {
  margin: 1rem 0;
}
form + form {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
#notice {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  background: #172e25;
  color: white;
  padding: 0.9rem 1.2rem;
  border-radius: 8px;
  max-width: min(90vw, 600px);
}
#notice.show {
  display: block;
}
.login {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
.login-art {
  position: relative;
  background: #153e31;
  color: #e8efc9;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(22px, 5vw, 80px);
}
.login-art > * {
  position: relative;
}
.login-art .weave {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(38deg, transparent 0 32px, #3b6250 33px 34px, transparent 35px 42px),
    repeating-linear-gradient(141deg, transparent 0 60px, #335a46 61px 62px, transparent 63px 73px);
  opacity: 0.65;
}
.art-word {
  font-size: clamp(3.6rem, 7vw, 8rem);
  line-height: 0.9;
  letter-spacing: -0.075em;
}
.art-word i {
  font-weight: 400;
}
.login-form {
  align-self: center;
  width: min(420px, 82%);
  margin: 4rem auto;
}
.login-form h1 {
  margin: 1rem 0;
}
.login-form p {
  color: var(--mute);
}
.login-form form {
  margin-top: 2rem;
}
.login-form button {
  margin-top: 1rem;
  width: 100%;
}
.login-form label {
  margin: 1.1rem 0;
}
.login-art small {
  letter-spacing: 0.15em;
}
dialog {
  border: 1px solid var(--line);
  max-height: 88vh;
  max-width: min(92vw, 460px);
  width: 420px;
  border-radius: 10px;
  padding: 1.3rem;
}
dialog::backdrop {
  background: #172c2366;
}
.slip,
.label {
  font-family: monospace;
  overflow-wrap: anywhere;
}
.slip {
  text-align: center;
  padding: 0.8rem;
}
.slip h2 {
  margin-top: 1rem;
}
.ref {
  font-size: 0.85rem;
}
.ticket-line {
  text-align: left;
  border-top: 1px dashed #88988a;
  padding: 0.5rem 0;
}
.label {
  margin: 1rem 0;
  padding: 2mm;
  border: 1px dashed #aaa;
}
.paper-tools {
  justify-content: flex-end;
}
@media (max-width: 800px) {
  .layout {
    grid-template-columns: 1fr;
  }
  aside {
    padding: 12px 16px;
    gap: 10px;
  }
  aside > .eyebrow,
  .sidefoot {
    display: none;
  }
  nav {
    display: flex;
    overflow-x: auto;
  }
  .nav {
    white-space: nowrap;
    font-size: 0.85rem;
  }
  .nav span {
    width: auto;
  }
  .brand .mark {
    width: 27px;
    height: 27px;
  }
  header {
    flex-wrap: wrap;
    min-height: auto;
  }
  .metrics {
    gap: 6px;
  }
  .metrics strong {
    font-size: 1.6rem;
  }
  .metrics section {
    padding: 12px;
  }
  .title {
    flex-wrap: wrap;
  }
  .record {
    flex-wrap: wrap;
  }
  .login {
    grid-template-columns: 1fr;
  }
  .login-art {
    min-height: 200px;
  }
  .art-word {
    font-size: 3rem;
  }
  .login-form {
    margin: 2rem auto;
  }
  .login-art small {
    font-size: 0.6rem;
  }
}
@media print {
  @page {
    margin: 2mm;
  }
  html,
  body {
    margin: 0;
    background: white;
    color: #000;
    height: auto;
    overflow: visible;
  }
  #app,
  #notice,
  .paper-tools {
    display: none !important;
  }
  dialog[open] {
    display: block;
    position: static;
    inset: auto;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    width: 76mm;
    max-width: 100%;
    height: auto;
    max-height: none;
    overflow: visible;
    color: #000;
  }
  dialog::backdrop {
    display: none;
  }
  .slip {
    font-size: 10pt;
    padding: 0;
  }
  .ticket-line {
    break-inside: avoid;
  }
  .ticket-line small {
    color: #000;
  }
  .label {
    box-sizing: border-box;
    width: 50mm;
    min-height: 25mm;
    margin: 0;
    font-size: 8pt;
    break-after: page;
    break-inside: avoid;
  }
  .label:last-child {
    break-after: auto;
  }
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.allowed[hidden] { display: none; }
form input[type="checkbox"] { width: auto; }
