[hidden] { display: none !important; }
.qp { max-width: 980px; margin: 0 auto; padding: 12px 16px 80px; font-family: "Golos Text", system-ui, sans-serif; color: #1f1b2e; }
.qp-head h1 { font-family: "Unbounded", sans-serif; font-size: 1.6rem; margin: 6px 0 2px; }
.qp-head h1 span { color: #7c3aed; }
.qp-sub { margin: 0 0 12px; color: #555; }
.qp-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.qp button, .qp-dlg button { font: inherit; border: 1px solid #d9d3ea; background: #fff; color: #1f1b2e; border-radius: 12px; padding: 9px 13px; cursor: pointer; min-height: 42px; }
.qp button:hover, .qp-dlg button:hover { border-color: #7c3aed; }
.qp-sizes button.on, .qp-tabs button.on { background: #7c3aed; color: #fff; border-color: #7c3aed; }
.qp-accent { border-color: #7c3aed !important; font-weight: 600; }
.qp-magic button { background: linear-gradient(135deg, #f5f0ff, #fff7e6); }
.qp-primary { background: #7c3aed !important; color: #fff !important; border-color: #7c3aed !important; font-weight: 600; }
.qp-ghost { background: transparent !important; }
.qp-danger { color: #b91c1c !important; }
.qp-stage { position: relative; background: #ece9f3; border-radius: 16px; padding: 14px; display: flex; flex-direction: column; align-items: center; }
#cv { display: block; max-width: 100%; box-shadow: 0 6px 24px rgba(30, 20, 60, 0.18); touch-action: none; background: #fff; cursor: default; }
.qp-hint { margin: 10px 0 0; font-size: 0.9rem; color: #555; text-align: center; }
.qp-panel { background: #fff; border: 1px solid #e5e0f0; border-radius: 14px; padding: 8px 10px; margin-top: 10px; position: sticky; bottom: 8px; z-index: 5; box-shadow: 0 4px 18px rgba(30, 20, 60, 0.12); }
.qp-panel textarea { width: 100%; box-sizing: border-box; font: inherit; border: 1px solid #d9d3ea; border-radius: 10px; padding: 8px; }
.qp-panel input[type=color] { width: 44px; height: 42px; border: 1px solid #d9d3ea; border-radius: 10px; padding: 2px; background: #fff; }
.qp-panel select { font: inherit; height: 42px; border-radius: 10px; border: 1px solid #d9d3ea; padding: 0 8px; max-width: 170px; }
.qp-out { margin-top: 14px; }
.qp-msg { background: #f5f0ff; border-radius: 10px; padding: 8px 12px; margin: 8px 0; white-space: pre-line; }
.qp-faint { color: #6b6680; font-size: 0.88rem; }
.qp-foot { margin-top: 24px; }

.qp-dlg { border: none; border-radius: 18px; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); }
.qp-dlg::backdrop { background: rgba(20, 10, 40, 0.45); }
.qp-dlg-in { padding: 16px 18px; font-family: "Golos Text", system-ui, sans-serif; }
.qp-dlg h2 { margin: 0 0 10px; font-size: 1.15rem; }
.qp-dlg label { display: block; margin: 8px 0; font-weight: 600; font-size: 0.92rem; }
.qp-dlg label.qp-inline { display: inline-flex; gap: 8px; align-items: center; margin: 0; }
.qp-dlg input:not([type=color]), .qp-dlg textarea { display: block; width: 100%; box-sizing: border-box; font: inherit; font-weight: 400; margin-top: 4px; border: 1px solid #d9d3ea; border-radius: 10px; padding: 9px; }
.qp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qp-tabs { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.qp-groups-head { margin-top: 12px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.qp-group { border: 1px solid #e5e0f0; border-radius: 12px; padding: 8px; margin: 8px 0; position: relative; }
.qp-group input { font-weight: 600 !important; }
.qp-group .qp-x { position: absolute; top: 4px; right: 4px; min-height: 30px !important; padding: 2px 9px !important; }
.qp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.qp-chips button { min-height: 34px !important; padding: 4px 10px !important; font-size: 0.88rem; border-style: dashed !important; }
.qp-swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 10px; }
.qp-swatches button { height: 44px; border-radius: 10px; padding: 0; }
.qp-dlg-btns { margin-top: 14px; }

#printImg { display: none; }
@media print {
  body > *:not(#printImg) { display: none !important; }
  #printImg { display: block !important; width: 100%; height: auto; }
  @page { margin: 0; }
}
@media (max-width: 520px) {
  .qp-two { grid-template-columns: 1fr; }
  .qp button { padding: 8px 10px; }
}
.qp-paid { background: #fff7e6; border: 1px solid #fde3a7; border-radius: 10px; padding: 8px 10px; font-size: 0.86rem; color: #5b4300; margin: 8px 0 0; }
.qp-dump { border: 1px dashed #c9b8f0; border-radius: 12px; padding: 8px 10px; margin: 6px 0 4px; background: #faf7ff; }
.qp-dump summary { cursor: pointer; font-weight: 600; }
.qp-dump button { margin-top: 6px; }
.qp-dlg label.qp-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; margin-top: 12px; }
.qp-dlg label.qp-check input { width: 22px; height: 22px; margin: 0; flex: none; }
.qp-layers { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.qp-layer-list { display: flex; flex-wrap: wrap; gap: 6px; }
.qp-layer-list button { min-height: 34px !important; padding: 4px 10px !important; font-size: 0.88rem; }
.qp-layer-list button.on { background: #7c3aed !important; color: #fff !important; border-color: #7c3aed !important; }
.qp-layer-list button.under { border-style: dashed !important; border-color: #ec4899 !important; }
.qp #tShade.on { border-color: #7c3aed; background: #f5f0ff; }
.qp button:disabled { opacity: 0.45; cursor: default; }
.qp-who { display: inline-flex; align-items: center; min-height: 42px; padding: 0 13px; border-radius: 12px; background: #ecfdf5; border: 1px solid #10b981; color: #065f46; font-weight: 600; text-decoration: none; }
.qp-mine { border: 1px solid #e5e0f0; border-radius: 12px; padding: 10px; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.qp-mine b { display: block; }
.qp-mine .qp-row { margin: 0; }
.qp-mine a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 11px; border-radius: 10px; border: 1px solid #d9d3ea; color: #1f1b2e; text-decoration: none; }
.qp-outline label { display: inline-flex; align-items: center; gap: 8px; font-size: 0.92rem; color: #4b4560; }
.qp-outline input[type=range] { width: 150px; accent-color: #7c3aed; }
