* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: #17382f;
  background: #f4f5ee;
}
header {
  background: #123f34;
  color: white;
  padding: 1.5rem max(4vw, 1rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}
header a {
  color: #daf496;
  text-decoration: none;
  font-weight: 700;
}
h1 {
  font-size: clamp(1.65rem, 4vw, 2.75rem);
  letter-spacing: -0.055em;
  margin: 0.25em 0 0;
}
.right,
.tools,
.filters,
.actions {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  flex-wrap: wrap;
}
header .right {
  justify-content: flex-end;
}
main {
  max-width: 1560px;
  margin: auto;
  padding: 1.6rem max(3vw, 0.8rem);
}
button,
select {
  font: inherit;
  border: 1px solid #bcc9c0;
  background: white;
  color: #17382f;
  border-radius: 10px;
  min-height: 44px;
  padding: 0.55em 0.9em;
  font-weight: 650;
  cursor: pointer;
}
.tools {
  justify-content: space-between;
  margin-bottom: 1.4rem;
}
.filters button[aria-pressed="true"],
.next {
  color: white;
  background: #123f34;
  border-color: #123f34;
}
#board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  align-items: start;
  gap: 1rem;
}
.pair-panel {max-width:33rem;background:white;border:1px solid #ccd7cb;border-radius:16px;padding:1.5rem;margin:1rem auto}
.pair-panel h2 {margin:0}.pair-panel label {display:block;font-weight:700;margin-top:1rem}
.pair-panel div {display:flex;flex-wrap:wrap;gap:.5rem;margin:.4rem 0}
.pair-panel input {font:inherit;min-width:0;width:12em;min-height:44px;padding:.55em;border:1px solid #a9b7ac;border-radius:8px}
.pair-panel button{background:#123f34;color:white}.pair-panel small{color:#526259}
@media print{#pair-panel{display:none!important}}
.ticket,
.empty {
  background: white;
  border: 1px solid #ccd7cb;
  border-radius: 16px;
  padding: 1.3rem;
  box-shadow: 0 3px 12px #223e2210;
}
.ticket {
  border-top: 6px solid #d8ed97;
}
.ticket.cooking {
  border-top-color: #d98747;
}
.ticket.done,
.ticket.cancelled {
  border-top-color: #85938d;
}
.ticket h2 {
  margin: 0.25em 0;
  font-size: 1.8rem;
  letter-spacing: -0.04em;
}
.ticket ul,
#print ul {
  list-style: none;
  padding: 0;
  margin: 1.1em 0;
}
.ticket li,
#print li {
  display: flex;
  align-items: baseline;
  gap: 0.6em;
  justify-content: space-between;
  font-size: 1.15rem;
  font-weight: 660;
  margin: 0.5em 0;
}
.ticket li small {
  font-size: 0.8em;
  color: #714719;
  display: block;
}
.ticket p {
  margin: 0.5em 0;
  color: #466456;
}
.hint,
#sync {
  font-size: 0.9rem;
}
#alert {
  padding: 1rem;
  background: #ffedc0;
  border-radius: 10px;
}
#print {
  display: none;
}
.empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 3.5rem 1rem;
}
.empty h2 {
  margin: 0 0 0.4em;
}
.empty p {
  margin: 0;
  color: #52665d;
}
.empty a {
  color: #254e3b;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #cb9029;
  outline-offset: 3px;
}
@media (max-width: 640px) {
  header {
    align-items: start;
    flex-wrap: wrap;
  }
  .right {
    font-size: 0.9rem;
  }
  .tools {
    gap: 0.8rem;
  }
  .filters {
    gap: 0.3rem;
  }
  .filters button {
    font-size: 0.9rem;
  }
}
@media print {
  @page {
    margin: 2mm;
  }
  html,
  body {
    background: white;
    color: black;
    margin: 0;
  }
  body > header,
  body > main {
    display: none !important;
  }
  #print {
    display: block;
    width: 72mm;
    font-family: Pretendard, sans-serif;
    font-size: 11pt;
  }
  #print.narrow {
    width: 51mm;
  }
  #print h1 {
    font-size: 20pt;
  }
  #print h2 {
    font-size: 15pt;
  }
  #print p {
    margin: 4pt 0;
  }
  #print li {
    border-bottom: 1px dashed #777;
    padding: 3pt 0;
    break-inside: avoid;
  }
  #print small {
    display: block;
    font-size: 9pt;
  }
}
.pickup-link { display:inline-flex; align-items:center; min-height:44px; padding:0 12px; border:1px solid currentColor; border-radius:8px; color:inherit; font-weight:650; }
.pickup-link[hidden] { display:none; }
