/* Tent / place card printer — shared styles for EN and ZH pages.
   Screen: scaled preview in mm. Print: exact paper size, one sheet per page. */

/* This tool needs a wide two-column shell; the shared tool-shell is only 760px. */
.tc-wide { max-width: 1400px !important; }
.tc-print-panel { padding: 16px !important; }
.tc-wrap { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 940px) { .tc-wrap { grid-template-columns: 1fr; } }

.tc-panel { background: #fff; border: 1px solid var(--border, #e3e8ef); border-radius: 12px; padding: 16px; }
.tc-panel + .tc-panel { margin-top: 14px; }
.tc-row { margin-bottom: 13px; }
.tc-row:last-child { margin-bottom: 0; }
.tc-row > label, .tc-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--text, #1f2937); }
.tc-row input[type="text"], .tc-row input[type="number"], .tc-row select, .tc-row textarea {
  width: 100%; box-sizing: border-box; padding: 8px 10px; font-size: 14px;
  border: 1px solid #d7dde6; border-radius: 8px; background: #fff; color: #1f2937;
  font-family: inherit;
}
.tc-row textarea { min-height: 128px; resize: vertical; line-height: 1.6; }
.tc-row input[type="range"] { width: 100%; }
.tc-row input[type="color"] { width: 100%; height: 36px; padding: 2px; border: 1px solid #d7dde6; border-radius: 8px; background: #fff; cursor: pointer; }
.tc-inline { display: flex; gap: 8px; align-items: center; }
.tc-inline > * { flex: 1; min-width: 0; }
.tc-inline .tc-unit { flex: 0 0 auto; font-size: 12px; color: #6b7280; }
.tc-check { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; margin: 7px 0; cursor: pointer; }
.tc-check input { width: 15px; height: 15px; margin: 0; }
.tc-seg { display: flex; gap: 6px; flex-wrap: wrap; }
.tc-seg button {
  flex: 1 1 auto; min-width: 62px; padding: 7px 8px; font-size: 13px; cursor: pointer;
  border: 1px solid #d7dde6; border-radius: 8px; background: #fff; color: #374151;
}
.tc-seg button.on { background: #2563eb; border-color: #2563eb; color: #fff; font-weight: 600; }
.tc-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.tc-btns button {
  flex: 1 1 auto; padding: 10px 14px; font-size: 14px; font-weight: 600; cursor: pointer;
  border-radius: 9px; border: 1px solid #2563eb; background: #2563eb; color: #fff;
}
.tc-btns button.tc-ghost { background: #fff; color: #2563eb; }
.tc-btns button.tc-plain { background: #f3f4f6; color: #374151; border-color: #d7dde6; }
.tc-note { font-size: 12px; line-height: 1.6; color: #6b7280; margin: 7px 0 0; }
.tc-count { font-size: 12px; color: #2563eb; font-weight: 600; margin-top: 6px; }
.tc-file { font-size: 12px; color: #059669; margin-top: 5px; word-break: break-all; }

/* Preview area */
.tc-preview {
  background: #eef1f6; border: 1px solid var(--border, #e3e8ef); border-radius: 12px;
  padding: 16px; min-height: 200px; overflow: auto;
}
.tc-preview-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.tc-preview-bar span { font-size: 12px; color: #6b7280; }
.tc-preview-bar input[type="range"] { flex: 1 1 130px; min-width: 90px; }
.tc-preview-bar button {
  padding: 5px 10px; font-size: 12px; cursor: pointer; white-space: nowrap;
  border: 1px solid #d7dde6; border-radius: 7px; background: #fff; color: #374151;
}
.tc-preview-bar button:hover { border-color: #2563eb; color: #2563eb; }
.tc-holder { position: relative; margin: 0 auto; }
.tc-scaler { transform-origin: top left; }
.tc-sheets { display: block; }
.tc-sheet {
  position: relative; background: #fff; box-sizing: border-box; overflow: hidden;
  box-shadow: 0 6px 22px rgba(15, 23, 42, .18); margin-bottom: 18px;
  display: grid; grid-template-columns: 1fr;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.tc-sheet.cols-2 { grid-template-columns: 1fr 1fr; }
.tc-slot { position: relative; display: flex; flex-direction: column; overflow: hidden; height: 100%; box-sizing: border-box; }
.tc-face {
  height: 50%; box-sizing: border-box; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 6mm 5mm; overflow: hidden;
}
.tc-face--back { transform: rotate(180deg); }
.tc-name { display: inline-block; white-space: nowrap; line-height: 1.15; text-align: center; cursor: grab; touch-action: none; }
.tc-sub { display: inline-block; white-space: nowrap; line-height: 1.3; text-align: center; margin-top: 3mm; cursor: grab; touch-action: none; }
.tc-grabbing, .tc-grabbing * { cursor: grabbing !important; user-select: none !important; }
.tc-foldline { position: absolute; left: 0; right: 0; top: 50%; border-top: 1px dashed #9aa4b2; pointer-events: none; }
.tc-midline-v { position: absolute; top: 0; bottom: 0; left: 50%; border-left: 1px dashed #9aa4b2; pointer-events: none; }
.tc-slotborder { position: absolute; inset: 0; border: 1px dashed #c3cbd6; pointer-events: none; }
.tc-sheet.no-fold .tc-foldline, .tc-sheet.no-fold .tc-midline-v { display: none; }
.tc-sheet.no-border .tc-slotborder { display: none; }
.tc-empty { padding: 40px 10px; text-align: center; color: #6b7280; font-size: 14px; }

/* Print: hide the whole UI shell, output only the sheets */
@media print {
  @page { margin: 0; }
  html, body { margin: 0 !important; padding: 0 !important; background: #fff !important; }
  .site-header, .site-footer, .back-home, .tool-head, .tc-panel,
  .guide-en, .guide-zh, .rel-tools, .tc-preview-bar, .tc-note,
  .tool-panel:not(.tc-print-panel) { display: none !important; }
  .container, .tool-shell, main { margin: 0 !important; padding: 0 !important; max-width: none !important; width: auto !important; border: 0 !important; }
  .tc-wrap { display: block !important; }
  .tool-panel.tc-print-panel { margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; }
  .tc-preview { padding: 0 !important; margin: 0 !important; border: 0 !important; background: none !important; overflow: visible !important; min-height: 0 !important; }
  .tc-holder, .tc-scaler { width: auto !important; height: auto !important; transform: none !important; margin: 0 !important; }
  .tc-sheet {
    margin: 0 !important; box-shadow: none !important; border: 0 !important;
    break-inside: avoid; page-break-inside: avoid;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  /* Force a new page BEFORE the 2nd and later sheets, never AFTER the last one:
     break-after:page on every sheet creates a trailing blank page. */
  .tc-sheet + .tc-sheet { break-before: page; page-break-before: always; }
  .tc-slotborder { display: none !important; }
  .tc-foldline, .tc-midline-v { display: none !important; }
}
