* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Courier New', monospace;
  background: #2b3439;
  color: #e8e8e8;
  overflow: hidden;
}

.toolbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  background: #1f2630;
  border-bottom: 1px solid #0d1116;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  z-index: 10;
}

.toolbar .brand {
  font-size: 13px;
  letter-spacing: 0.12em;
  font-weight: bold;
  color: #c9d6df;
  margin-right: 14px;
}

.toolbar button {
  background: #2c3744;
  color: #d9e2eb;
  border: 1px solid #455365;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.05em;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.12s;
}

.toolbar button:hover {
  background: #3a4858;
  border-color: #6a7a90;
}

.toolbar button:active {
  background: #1d2531;
}

.toolbar button.primary {
  background: #d32f2f;
  border-color: #a32020;
  color: #fff;
}

.toolbar button.primary:hover {
  background: #e0464a;
}

.toolbar .spacer { flex: 1; }

#status {
  font-size: 11px;
  color: #8fa3b8;
  letter-spacing: 0.06em;
}

.sheet-wrap {
  position: absolute;
  top: 44px; left: 0; right: 0; bottom: 0;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 30% 20%, #364450 0%, #1c242c 80%);
}

#sheet {
  width: 100%;
  height: 100%;
  background: #fafaf2;
  box-shadow:
    0 14px 40px rgba(0,0,0,0.55),
    0 4px 8px rgba(0,0,0,0.35);
  border: 1px solid #0d1116;
}

/* Print: A3 landscape, no UI, drawing fills the page */
@media print {
  @page {
    size: A3 landscape;
    margin: 6mm;
  }

  html, body {
    background: #fff !important;
    color: #000 !important;
    overflow: visible;
    width: 100%;
    height: 100%;
  }

  .toolbar { display: none !important; }

  .sheet-wrap {
    position: static;
    padding: 0;
    background: #fff !important;
    width: 100%;
    height: 100%;
  }

  /* A3 landscape inner area minus 6mm page margins ≈ 408mm × 285mm */
  #sheet {
    width: 408mm;
    height: 285mm;
    background: #fff !important;
    box-shadow: none;
    border: none;
  }
}
