.stamp-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.stamp-right { position: sticky; top: 84px; }
.preview-step { border-top: 0; }
.qr-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); padding: 22px; box-shadow: var(--shadow-2); }
.qr-frame { position: relative; aspect-ratio: 1; border-radius: var(--r-lg); overflow: hidden; background: #fff; }
#qr-canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; transition: opacity .2s; }
#qr-canvas.pop { animation: qrpop .35s var(--ease); }
@keyframes qrpop { from { transform: scale(.97); opacity: .6; } to { transform: none; opacity: 1; } }
.qr-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 24px; color: var(--muted); background: var(--soft); border-radius: var(--r-lg); font-weight: 600; }
.qr-empty svg { width: 56px; height: 56px; color: var(--c2); opacity: .7; }
.qr-empty[hidden] { display: none; }
.qr-status { margin-top: 12px; text-align: center; min-height: 1.4em; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; width: 40px; height: 40px; }
.swatch input { position: absolute; inset: 0; opacity: 0; pointer-events: none; margin: 0; }
.swatch { cursor: pointer; }
.swatch span { display: block; width: 100%; height: 100%; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--line-2); transition: transform .15s var(--ease), box-shadow .15s; }
.swatch input:checked + span { box-shadow: 0 0 0 2.5px var(--ink); transform: scale(1.06); }
.swatch input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--c2) 55%, white); outline-offset: 3px; }
.more summary { cursor: pointer; font-weight: 600; color: var(--ink-2); padding: 6px 0; }
.dl-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.dl-row .btn-primary { flex: 1 1 200px; }
.recent { margin-top: 24px; padding-top: 28px; border-top: 1px solid var(--line); }
.recent-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.recent-list li { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-radius: var(--r); background: var(--paper); }
.recent-list .rl { flex: 1; min-width: 0; }
.recent-list .rl b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-list .rl small { color: var(--muted); font-size: 12.5px; }
.print-sheet { display: none; }

@media (max-width: 900px) {
  .stamp-grid { grid-template-columns: 1fr; gap: 0; }
  .stamp-right { position: static; }
  .preview-step { border-top: 1px solid var(--line); }
}

@media print {
  body > *:not(main), main > *:not(.app), .app > *:not(.print-sheet) { display: none !important; }
  .print-sheet { display: block !important; text-align: center; padding-top: 40px; }
  .print-sheet #print-svg svg { width: 12cm; height: 12cm; }
  .print-sheet p { font: 600 18pt/1.3 var(--body); margin-top: 16px; word-break: break-word; }
  .print-sheet .print-foot { font-size: 12pt; font-weight: 400; color: #444; }
}
