@font-face {
  font-family: 'Bebas Neue';
  src: url('/templates/raised-text-sign/assets/vendor/BebasNeue-Regular.ttf?v=20260521-14') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

.view-tab {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.view-tab:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.08);
}

.view-tabs {
  position: absolute;
  z-index: 6;
  top: 95px;
  left: 18px;
  display: flex;
  gap: 8px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.view-tab.active {
  color: #fff;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  border-color: var(--accent);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.22);
}

.view-tab.view-action {
  background: var(--surface-2);
}

.canvas-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  min-height: 0;
}

.info-strip {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  background: var(--surface);
  border-left: 1px solid var(--border);
}

.info-strip div {
  padding: 12px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.04);
}

.info-strip span,
.info-strip strong {
  display: block;
}

.info-strip span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.info-strip strong {
  margin-top: 4px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
}

.viewport {
  position: relative;
  min-width: 0;
  min-height: 0;
  background: #f8fafc;
  border: 1px solid var(--border);
  overflow: hidden;
}

#previewSvg,
#threeViewport {
  width: 100%;
  height: 100%;
  min-height: 520px;
  background:
    radial-gradient(circle at 18% 14%, rgba(245, 158, 11, .10), transparent 30%),
    linear-gradient(135deg, #f8fafc, #eef4fb);
  border-radius: 18px;
}

#previewSvg {
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.text-sign-layout .viewport {
  min-height: 580px;
}

.text-sign-guide {
  fill: none;
  stroke: rgba(15, 23, 42, .18);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.text-sign-text {
  fill: #b8752f;
  stroke: rgba(15, 23, 42, .82);
  stroke-width: 1.25;
  paint-order: stroke fill;
  dominant-baseline: alphabetic;
  user-select: none;
}

.text-sign-shadow {
  fill: rgba(15, 23, 42, .16);
}

.text-sign-dim,
.text-sign-label {
  fill: #334155;
  font: 700 13px Inter, sans-serif;
  pointer-events: none;
  user-select: none;
}

.text-sign-dim-line {
  stroke: #475569;
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.params-form textarea {
  width: 100%;
  min-height: 82px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  background: var(--panel);
  font: 600 14px/1.35 Inter, sans-serif;
}

[data-theme="dark"] #previewSvg,
[data-theme="dark"] #threeViewport {
  background:
    radial-gradient(circle at 18% 14%, rgba(245, 158, 11, .12), transparent 30%),
    linear-gradient(135deg, #111827, #0f172a);
}

[data-theme="dark"] .text-sign-dim,
[data-theme="dark"] .text-sign-label {
  fill: #cbd5e1;
}

@media (max-width: 760px) {

  .view-tabs {
    top: 10px;
    left: 10px;
    right: 10px;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px;
  }

  .view-tab {
    min-height: 30px;
    padding: 5px 8px;
    border-radius: 7px;
    font-size: 11px;
  }

  .view-tabs .view-action {
    display: none;
  }

  .view-cube {
    top: 62px;
    right: 10px;
  }

  .canvas-layout {
    grid-template-columns: 1fr;
  }

  .info-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-left: 0;
    border-top: 1px solid var(--border);
    padding-bottom: 96px;
  }

  #previewSvg,
  #threeViewport {
    min-height: 420px;
  }

  .text-sign-layout .viewport {
    min-height: 460px;
  }
}


#threeViewport {
  position: relative;
}

#threeViewport canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.view-cube {
  position: absolute;
  z-index: 4;
  top: 12px;
  right: 12px;
  width: 112px;
  height: 112px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

#threeViewport .view-cube canvas {
  display: block;
  width: 112px !important;
  height: 112px !important;
  cursor: pointer;
  touch-action: none;
}

.drawing-layout {
  display: grid;
  gap: 14px;
}

.drawing-page {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .08);
  padding: 18px;
}

.print-header {
  display: none;
}

.drawing-page #drawingSvg {
  display: block;
  width: 100%;
  min-height: 560px;
}


@media print {
  @page {
    margin: 8mm;
  }

  html,
  body {
    width: 100%;
    height: auto;
    margin: 0;
    padding: 0 !important;
    overflow: visible !important;
  }

  body > *:not(.app-shell),
  .sidebar,
  .topbar,
  .view-tabs,
  .drawing-actions,
  .info-strip,
  #modelView,
  #toast,
  #footerBar,
  #toTopBtn {
    display: none !important;
  }

  .app-shell,
  .workspace,
  .drawing-layout,
  #drawingView {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  .drawing-page {
    display: grid;
    grid-template-rows: 18mm 1fr;
    width: 100% !important;
    height: calc(100vh - 16mm) !important;
    margin: 0 !important;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .print-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12mm;
    padding: 0 0 4mm;
    border-bottom: 1px solid #d1d5db;
  }

  .print-header img {
    display: block;
    width: 52mm;
    height: 14mm;
    object-fit: contain;
  }

  .print-header div {
    display: grid;
    gap: 1mm;
    text-align: right;
    color: #111827;
    font-family: Inter, Arial, sans-serif;
  }

  .print-header strong {
    font-size: 14pt;
    line-height: 1.1;
  }

  .print-header span {
    font-size: 9pt;
    color: #4b5563;
  }

  #drawingSvg {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
  }
}

@media (min-width: 921px) and (max-width: 1500px) {
  .view-tabs {
    gap: 6px;
    padding: 5px;
  }

  .view-tab {
    min-height: 32px;
    padding: 6px 11px;
    border-radius: 7px;
    font-size: 11px;
  }
}

@media (max-width: 760px) {
  .view-cube {
    top: 62px;
    right: 10px;
  }
}
