@import url('lock.css');
@page { size: A4; margin: 0; }
html, body { margin: 0; padding: 0; }
body {
  background: #3f4448;
  color: #e8e8e8;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 12px;
}
body { margin-left: 348px; }
#studio {
  position: fixed; top: 0; left: 0; width: 348px; height: 100vh; overflow-y: auto;
  background: #202427; color: #e6e6e6; padding: 12px; z-index: 10000;
  box-shadow: 2px 0 14px rgba(0,0,0,.45);
}
#studio h1 { font-size: 15px; margin: 2px 0 4px; color: #7fc7a2; letter-spacing: .02em; }
#studio .sub { color: #8d9a94; font-size: 10.5px; line-height: 1.45; margin: 0 0 12px; }
#studio details {
  background: #292e32; border: 1px solid #363c40; border-radius: 6px;
  margin: 0 0 10px; padding: 8px 10px;
}
#studio summary {
  cursor: pointer; font-weight: 700; color: #7fc7a2; font-size: 12.5px;
  list-style: none; outline: none;
}
#studio summary::-webkit-details-marker { display: none; }
#studio summary::after { content: "−"; float: right; color: #8d9a94; font-weight: 400; }
#studio details:not([open]) summary::after { content: "+"; }
#studio label { display: block; margin: 9px 0 3px; color: #b9c2bd; font-size: 11.5px; }
#studio input[type=text], #studio input[type=number], #studio textarea {
  width: 100%; box-sizing: border-box; background: #171a1c; color: #f2f2f2;
  border: 1px solid #40474b; border-radius: 4px; padding: 7px 8px; font-size: 12px;
  font-family: ui-monospace, Menlo, monospace;
}
#studio textarea { min-height: 70px; resize: vertical; line-height: 1.45; }
#studio .two { display: flex; gap: 8px; }
#studio .two > div { flex: 1; }
#studio button {
  background: #2f7d59; color: #fff; border: 0; border-radius: 4px;
  padding: 9px 10px; font-size: 12.5px; font-weight: 600; cursor: pointer; width: 100%;
}
#studio button.ghost { background: #363c40; color: #ddd; font-weight: 500; margin-top: 6px; }
#studio button:hover { filter: brightness(1.1); }
#studio button:disabled { opacity: .5; cursor: default; }
#studio .chk { display: flex; align-items: center; gap: 7px; margin: 9px 0 0; cursor: pointer; color: #cfd6d2; }
#studio .chk input { accent-color: #7fc7a2; width: 15px; height: 15px; }
#studio input[type=file] { width: 100%; color: #bdbdbd; font-size: 11px; }
#studio input[type=file]::file-selector-button {
  background: #2f7d59; color: #fff; border: 0; border-radius: 3px;
  padding: 5px 8px; margin-right: 8px; font-size: 11px; cursor: pointer;
}
#studio .qrthumb { margin-top: 6px; background: #fff; padding: 3px; border-radius: 3px; width: 76px; }
#studio .qrthumb img { display: block; width: 70px; height: 70px; }
#studio .hint { color: #83908a; font-size: 10.5px; line-height: 1.45; margin-top: 8px; }
#studio .err { color: #ff9a9a; font-size: 11px; margin-top: 6px; min-height: 14px; }
#studio .ok { color: #8fd18f; font-size: 10.5px; line-height: 1.45; margin-top: 4px; }
#studio .seg { display: flex; gap: 6px; margin-top: 4px; }
#studio .seg label {
  flex: 1; text-align: center; padding: 7px 4px; border-radius: 4px; cursor: pointer;
  background: #171a1c; border: 1px solid #40474b; margin: 0; font-size: 11.5px; color: #ddd;
}
#studio .seg input { display: none; }
#studio .seg label.on { background: #2f7d59; border-color: #2f7d59; color: #fff; }
#studio .seg label.off { opacity: .45; cursor: default; }
#pages {
  padding: 18px 0 38px;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.sheet {
  display: block; width: 595.3pt; height: 841.9pt; background: #fff;
  box-shadow: 0 3px 14px rgba(0,0,0,.45); flex: none;
}
@media print {
  @page { size: A4; margin: 0; }
  body { margin-left: 0 !important; background: #fff; }
  #studio { display: none !important; }
  #pages { display: block; padding: 0; gap: 0; }
  .sheet { box-shadow: none; margin: 0; break-after: page; page-break-after: always; }
  .sheet:last-child { break-after: auto; page-break-after: auto; }
}
