.hot-tool {
  --ink: #203d32;
  --pine: #245c46;
  --paper: #fffdf7;
  color: var(--ink);
  font: inherit;
}

.hot-tool .tool-panel {
  background: #f5f2e9;
  border: 1px solid #dcd7ca;
  border-radius: 16px;
  padding: clamp(16px, 4vw, 28px);
}

.hot-tool h2 { margin-top: 0; }
.hot-tool .field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.hot-tool .field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hot-tool label { font-weight: 650; }
.hot-tool input, .hot-tool textarea, .hot-tool select {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #8a968e;
  border-radius: 8px;
  background: white;
  color: #17251e;
  font: inherit;
}
.hot-tool textarea { resize: vertical; }
.hot-tool input:focus, .hot-tool textarea:focus, .hot-tool select:focus, .hot-tool button:focus-visible { outline: 3px solid #d9a849; outline-offset: 2px; }
.hot-tool .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.hot-tool button { min-height: 44px; padding: 10px 16px; border: 0; border-radius: 8px; background: var(--pine); color: white; font: inherit; font-weight: 700; cursor: pointer; }
.hot-tool button.secondary { background: #fff; color: var(--pine); border: 1px solid var(--pine); }
.hot-tool button:disabled { opacity: .5; cursor: not-allowed; }
.hot-tool .status { min-height: 1.5em; margin-bottom: 0; }
.hot-tool .print-sheet:empty { display: none; }
.hot-tool .print-sheet { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 20px; }
.hot-tool .print-sheet.layout-quarter { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.hot-tool .voucher-card {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: auto;
  aspect-ratio: 105 / 148;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2%;
  padding: 12% 9%;
  text-align: center;
  background: var(--paper);
  color: var(--pine);
  break-inside: avoid;
}
.hot-tool .voucher-card::before { content: ""; position: absolute; inset: 3mm; border: 0.4mm solid currentColor; border-radius: 2mm; pointer-events: none; }
.hot-tool .voucher-card.border-fir { color: #285d43; background: #fffdf7; }
.hot-tool .voucher-card.border-holly { color: #8c3545; background: #fffaf7; }
.hot-tool .ornament { position: absolute; inset: 0; color: currentColor; pointer-events: none; }
.hot-tool .motif { position: absolute; width: 15mm; height: 15mm; }
.hot-tool .motif:nth-child(1) { top: 5mm; left: 5mm; }
.hot-tool .motif:nth-child(2) { top: 5mm; right: 5mm; transform: rotate(90deg); }
.hot-tool .motif:nth-child(3) { right: 5mm; bottom: 5mm; transform: rotate(180deg); }
.hot-tool .motif:nth-child(4) { bottom: 5mm; left: 5mm; transform: rotate(270deg); }
.hot-tool .border-stars .motif::before, .hot-tool .border-stars .motif::after { content: ""; position: absolute; width: 8mm; height: 8mm; background: currentColor; clip-path: polygon(50% 0, 62% 35%, 100% 38%, 70% 59%, 80% 96%, 50% 74%, 20% 96%, 30% 59%, 0 38%, 38% 35%); }
.hot-tool .border-stars .motif::before { top: 0; left: 0; }
.hot-tool .border-stars .motif::after { right: 0; bottom: 0; width: 5mm; height: 5mm; }
.hot-tool .border-fir .motif::before { content: ""; position: absolute; left: 7mm; top: 1mm; width: .7mm; height: 13mm; background: currentColor; transform: rotate(42deg); }
.hot-tool .border-fir .needle { position: absolute; left: 3mm; top: calc(2mm + var(--needle-row, 0mm)); width: 8mm; height: 1.5mm; background: currentColor; clip-path: polygon(0 100%, 100% 0, 82% 100%); }
.hot-tool .border-fir .needle:nth-child(1) { --needle-row: 0mm; transform: rotate(20deg); }
.hot-tool .border-fir .needle:nth-child(2) { --needle-row: 2mm; transform: rotate(10deg); }
.hot-tool .border-fir .needle:nth-child(3) { --needle-row: 4mm; transform: rotate(0deg); }
.hot-tool .border-fir .needle:nth-child(4) { --needle-row: 6mm; transform: rotate(-10deg); }
.hot-tool .border-fir .needle:nth-child(5) { --needle-row: 8mm; transform: rotate(-20deg); }
.hot-tool .border-holly .blade { position: absolute; top: 4mm; left: 1mm; width: 9mm; height: 5mm; background: #347448; clip-path: polygon(0 50%, 15% 10%, 35% 35%, 60% 0, 75% 35%, 100% 50%, 75% 65%, 60% 100%, 35% 65%, 15% 90%); }
.hot-tool .border-holly .blade:nth-child(2) { left: 5mm; top: 7mm; transform: rotate(55deg); }
.hot-tool .border-holly .berry { position: absolute; z-index: 1; width: 2mm; height: 2mm; border-radius: 50%; background: #a83242; }
.hot-tool .border-holly .berry:nth-child(3) { top: 2mm; left: 8mm; }
.hot-tool .border-holly .berry:nth-child(4) { top: 4mm; left: 10mm; }
.hot-tool .border-holly .berry:nth-child(5) { top: 1mm; left: 11mm; }
.hot-tool .voucher-card p, .hot-tool .voucher-card h3 { position: relative; z-index: 1; max-width: 100%; margin: 0; overflow-wrap: anywhere; }
.hot-tool .voucher-kicker { font: 1rem Georgia, serif; }
.hot-tool .voucher-recipient { font: clamp(1.15rem, 5vw, 2rem) Georgia, serif; }
.hot-tool .voucher-label { margin-top: 2%; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.hot-tool .voucher-gift { font: clamp(.95rem, 4vw, 1.4rem) Georgia, serif; }
.hot-tool .voucher-message { font: italic .85rem Georgia, serif; }
.hot-tool .voucher-sender { margin-top: 3%; font-size: .8rem; }

@media (max-width: 600px) {
  .hot-tool .field-grid { grid-template-columns: minmax(0, 1fr); }
  .hot-tool .actions { flex-direction: column; }
  .hot-tool .actions button { width: 100%; }
}

@media print {
  @page { size: A4 portrait; margin: 0; }
  @page a6 { size: A6 portrait; margin: 0; }
  html, body { margin: 0 !important; padding: 0 !important; }
  body * { display: none !important; }
  body *:has(.hot-tool), .hot-tool { display: block !important; }
  .hot-tool { margin: 0 !important; padding: 0 !important; }
  .hot-tool > .print-sheet { display: grid !important; position: static; width: 210mm; height: 296mm; grid-template-columns: repeat(2, 105mm); grid-template-rows: repeat(2, 148mm); align-content: start; justify-content: start; gap: 0; margin: 0; }
  .hot-tool .print-sheet.layout-a6 { display: block !important; page: a6; width: 105mm; height: 148mm; }
  .hot-tool .print-sheet * { display: revert !important; }
  .hot-tool .voucher-card { display: flex !important; width: 105mm; height: 148mm; aspect-ratio: auto; margin: 0; padding: 18mm 13mm; gap: 3mm; }
  .hot-tool .voucher-kicker { font: 11pt Georgia, serif; }
  .hot-tool .voucher-recipient { font: 25pt Georgia, serif; }
  .hot-tool .voucher-label { margin-top: 3mm; font-size: 10pt; }
  .hot-tool .voucher-gift { font: 17pt Georgia, serif; }
  .hot-tool .voucher-message { font: italic 11pt Georgia, serif; }
  .hot-tool .voucher-sender { margin-top: 4mm; font-size: 10pt; }
}
