h1 { font-size: 1.15rem; }
h1 .ver { font-size: 0.8rem; font-weight: 400; color: var(--muted); margin-left: 4px; }
h2 { font-size: 1rem; margin-bottom: 12px; }

.content {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
  display: grid;
  gap: 12px;
}
.card {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}
[hidden] { display: none !important; }

/* 상단 알림 띠 */
.banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; line-height: 1.6; }
.banner strong { display: block; font-size: 1.05rem; }
.banner.paused { background: #fff3e0; box-shadow: 0 0 0 2px #f2b766; }
.banner.paused strong { color: var(--warn); }
.banner.notice { background: #fff6e6; box-shadow: 0 0 0 1px #f0d7a8; }
.banner.notice strong { color: var(--warn); }
.banner code { padding: 1px 6px; border-radius: 6px; background: #fbe9c8; }

.top { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }

.last { display: flex; flex-direction: column; }
.last-body {
  flex: 1;
  min-height: 190px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #fafaf8;
  box-shadow: inset 0 0 0 1px var(--line);
  padding: 12px;
}
.last-body img { width: 100%; height: 170px; object-fit: contain; }
.last-empty { margin: 0; color: var(--muted); }
.last-meta { display: flex; align-items: baseline; gap: 10px; margin-top: 10px; min-height: 2.4rem; }
.last-meta b { font-size: 2rem; line-height: 1; }
.last-meta span { color: var(--muted); }

.controls { display: flex; flex-direction: column; gap: 12px; }
.controls .row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.controls .label { color: var(--muted); }
.controls .queue { margin: 0; min-height: 1.4em; color: var(--muted); }
.controls .check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.controls .check input { width: 18px; height: 18px; }
button.big { min-height: 56px; font-size: 1.1rem; font-weight: 600; }
#pauseBtn.resume { background: var(--accent); border-color: var(--accent); color: #fff; }

.jobs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.job {
  display: grid;
  grid-template-columns: 120px 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 12px;
  box-shadow: 0 0 0 1px var(--line);
}
.job img {
  width: 120px;
  height: 60px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line);
}
.job .meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.job .meta b { font-size: 1.05rem; }
.job .meta span { color: var(--muted); font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job button { min-height: 38px; padding: 0.4em 0.9em; }
.empty { margin: 0; color: var(--muted); }
.help { margin: 4px 4px 24px; color: var(--muted); line-height: 1.6; font-size: 0.92rem; }

/* 태블릿 연결 창 */
dialog {
  width: min(420px, calc(100% - 32px));
  border: 0;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}
dialog::backdrop { background: rgba(20, 20, 20, 0.45); }
dialog h2 { font-size: 1.25rem; margin-bottom: 6px; }
dialog p { margin: 0 0 14px; color: var(--muted); line-height: 1.55; }
dialog .qr { width: 220px; height: 220px; margin: 0 auto 14px; }
dialog .qr svg { width: 100%; height: 100%; display: block; }
dialog .link-row { display: flex; gap: 8px; margin-bottom: 10px; }
dialog .link-row input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 0.9rem;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
}
dialog .caution { color: var(--warn); font-size: 0.9rem; }
dialog .close { width: 100%; }

@media (max-width: 720px) {
  .top { grid-template-columns: 1fr; }
  .banner { flex-direction: column; align-items: stretch; }
}
@media (max-width: 560px) {
  .job { grid-template-columns: 80px 1fr auto; }
  .job img { width: 80px; height: 44px; }
  .job button { grid-column: 1 / -1; }
}

/* ───────── 인쇄 ───────── */
@page { size: A4 portrait; margin: 0; }   /* 여백 0 → 크롬 머리글/바닥글(주소, 날짜)도 안 찍힘 */
#printArea { display: none; }

@media print {
  html, body { background: #fff !important; margin: 0; }
  .screen, #sp-toast, dialog { display: none !important; }
  #printArea {
    display: flex;
    position: fixed;
    inset: 0;
    align-items: center;
    justify-content: center;
  }
  #printImg {
    width: var(--sig-w, 75%);
    height: var(--sig-h, 40%);
    object-fit: contain;
  }
  #printNum {
    position: absolute;
    right: 12mm;
    bottom: 10mm;
    font: 9pt system-ui, "Malgun Gothic", sans-serif;
    color: #888;
  }
}
