/* Print Designer – kreator nadruku */
.pd-app {
  --pd-bg: #E8ECF0;
  --pd-surface: #FFFFFF;
  --pd-ink: #17202B;
  --pd-muted: #5A6676;
  --pd-line: #D8DEE5;
  --pd-accent: #0F6E7A;
  --pd-accent-hover: #0B5862;
  --pd-accent-soft: #E3F1F2;
  --pd-good: #1E7B45;
  --pd-ok: #946000;
  --pd-bad: #B42318;
  --pd-font: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  font: 15px/1.45 var(--pd-font);
  color: var(--pd-ink);
  background: var(--pd-bg);
  -webkit-font-smoothing: antialiased;
}
.pd-app *, .pd-app *::before, .pd-app *::after { box-sizing: border-box; }
html:has(body.pd-app) { height: 100%; }
body.pd-app {
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}
.pd-app button, .pd-app input, .pd-app select, .pd-app textarea { font: inherit; color: inherit; }
.pd-app button { cursor: pointer; }
.pd-app :focus-visible { outline: 2px solid var(--pd-accent); outline-offset: 2px; }
.pd-app svg { flex: none; }
.pd-app [hidden] { display: none !important; }

/* ---------- Pasek górny ---------- */
.pd-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  background: var(--pd-surface);
  border-bottom: 1px solid var(--pd-line);
  min-height: 64px;
}
.pd-back {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  color: var(--pd-ink);
}
.pd-back:hover { background: var(--pd-bg); }
.pd-title { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.pd-title span { font-size: 13px; color: var(--pd-muted); }
.pd-title strong { font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-top-actions { display: flex; gap: 10px; }

/* ---------- Przyciski ---------- */
.pd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 600;
  background: none;
  white-space: nowrap;
  transition: background-color .15s, border-color .15s;
}
.pd-btn-primary { background: var(--pd-accent); color: #fff; }
.pd-btn-primary:hover { background: var(--pd-accent-hover); }
.pd-btn-quiet { border-color: var(--pd-line); background: var(--pd-surface); }
.pd-btn-quiet:hover { border-color: var(--pd-muted); }
.pd-btn-outline { border-color: var(--pd-accent); color: var(--pd-accent); background: var(--pd-surface); }
.pd-btn-outline:hover { background: var(--pd-accent-soft); }
.pd-btn-block { width: 100%; }
.pd-cart-price { padding-left: 10px; border-left: 1px solid rgba(255,255,255,.35); font-variant-numeric: tabular-nums; }
.pd-icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 8px; background: none; }
.pd-icon-btn:hover { background: var(--pd-bg); }

/* ---------- Układ ---------- */
.pd-main {
  display: grid;
  grid-template-columns: 84px 312px minmax(0, 1fr) 300px;
  min-height: 0;
}
.pd-rail {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 8px;
  background: var(--pd-surface);
  border-right: 1px solid var(--pd-line);
}
.pd-rail-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--pd-muted);
  font-size: 12px;
  font-weight: 500;
}
.pd-rail-btn svg { width: 24px; height: 24px; }
.pd-rail-btn:hover { background: var(--pd-bg); color: var(--pd-ink); }
.pd-rail-btn.is-active { background: var(--pd-accent-soft); color: var(--pd-accent); }

.pd-panel, .pd-summary {
  background: var(--pd-surface);
  overflow-y: auto;
  padding: 20px;
}
.pd-panel { border-right: 1px solid var(--pd-line); }
.pd-summary { border-left: 1px solid var(--pd-line); display: flex; flex-direction: column; }
.pd-pane-title { font-size: 19px; font-weight: 600; margin: 0 0 16px; letter-spacing: -.01em; }

/* ---------- Pola ---------- */
.pd-field { display: block; margin: 0 0 18px; padding: 0; border: 0; min-width: 0; }
.pd-field-label { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 600; color: var(--pd-muted); margin: 0 0 8px; padding: 0; }
.pd-field-label output { font-weight: 500; color: var(--pd-ink); font-variant-numeric: tabular-nums; }
.pd-app textarea, .pd-app select, .pd-app input[type="search"], .pd-app input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--pd-line);
  border-radius: 8px;
  background: var(--pd-surface);
}
.pd-app textarea { resize: vertical; min-height: 64px; }
.pd-app textarea:focus, .pd-app select:focus, .pd-app input:focus { border-color: var(--pd-accent); outline: none; box-shadow: 0 0 0 3px var(--pd-accent-soft); }
#pd-add-text { margin: -6px 0 22px; }
.pd-app input[type="range"] { width: 100%; accent-color: var(--pd-accent); }
.pd-tip { font-size: 13px; color: var(--pd-muted); margin: 8px 0 0; }

.pd-app .pd-font-q { margin-bottom: 8px; }
.pd-font-cats { margin-bottom: 8px; }
.pd-fonts { display: flex; flex-direction: column; max-height: 264px; overflow-y: auto; border: 1px solid var(--pd-line); border-radius: 10px; background: var(--pd-surface); }
.pd-font {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: none;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-bottom: 1px solid var(--pd-line);
  background: none;
  font-size: 19px;
  line-height: 1.1;
  text-align: left;
}
.pd-font:last-child { border-bottom: 0; }
.pd-font-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-font:hover { background: var(--pd-bg); }
.pd-font[aria-pressed="true"] { background: var(--pd-accent-soft); color: var(--pd-accent); box-shadow: inset 3px 0 0 var(--pd-accent); }
.pd-font-flag { flex: none; font: 600 11px/1 var(--pd-font); color: var(--pd-ok); background: #FFF4D6; padding: 3px 6px; border-radius: 4px; }
#pd-font-out { max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pd-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-swatch {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(23,32,43,.18);
  padding: 0;
}
.pd-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--pd-surface), 0 0 0 4px var(--pd-accent); }
.pd-swatch-custom {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: conic-gradient(#C8102E, #F5C400, #2E8540, #0B6FB8, #6A3D9A, #C8102E);
  cursor: pointer;
}
.pd-swatch-custom input { opacity: 0; width: 100%; height: 100%; cursor: pointer; }

.pd-seg { display: flex; gap: 4px; }
.pd-seg button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 38px;
  border: 1px solid var(--pd-line);
  border-radius: 8px;
  background: var(--pd-surface);
}
.pd-seg button svg { width: 18px; height: 18px; }
.pd-seg button[aria-pressed="true"] { border-color: var(--pd-accent); background: var(--pd-accent-soft); color: var(--pd-accent); }
.pd-seg-gap { width: 10px; }

/* ---------- Wgrywanie ---------- */
.pd-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 28px 16px;
  border: 1.5px dashed #AEB8C4;
  border-radius: 12px;
  text-align: center;
  color: var(--pd-muted);
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.pd-drop strong { color: var(--pd-accent); font-size: 16px; margin-top: 6px; }
.pd-drop small { font-size: 12px; margin-top: 6px; }
.pd-drop:hover, .pd-drop.is-over { border-color: var(--pd-accent); background: var(--pd-accent-soft); }
.pd-drop.is-busy { pointer-events: none; opacity: .6; }
.pd-legend { list-style: none; margin: 18px 0 0; padding: 0; font-size: 13px; color: var(--pd-muted); display: grid; gap: 6px; }
.pd-legend li { display: flex; align-items: center; gap: 8px; }
.pd-legend i { width: 10px; height: 10px; border-radius: 50%; }
.pd-legend .is-good { background: var(--pd-good); }
.pd-legend .is-ok { background: var(--pd-ok); }
.pd-legend .is-bad { background: var(--pd-bad); }

/* ---------- Galeria ---------- */
.pd-search { display: flex; gap: 6px; margin-bottom: 10px; }
.pd-search .pd-btn { min-height: 0; }
.pd-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.pd-chips button {
  padding: 5px 11px;
  border: 1px solid var(--pd-line);
  border-radius: 999px;
  background: var(--pd-surface);
  font-size: 13px;
}
.pd-chips button[aria-pressed="true"] { border-color: var(--pd-ink); background: var(--pd-ink); color: #fff; }
.pd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.pd-grid[aria-busy="true"]:empty { min-height: 120px; background: linear-gradient(90deg, var(--pd-bg), #F4F6F8, var(--pd-bg)); border-radius: 8px; }
.pd-tile {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid var(--pd-line);
  border-radius: 8px;
  overflow: hidden;
  background: #F3F5F7;
}
.pd-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-tile:hover { border-color: var(--pd-accent); }
.pd-tile.is-busy::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.7) center / 22px no-repeat;
}
.pd-empty { grid-column: 1 / -1; color: var(--pd-muted); font-size: 14px; margin: 8px 0; }
.pd-credit { font-size: 12px; color: var(--pd-muted); }
.pd-credit a { color: inherit; }

/* ---------- Scena ---------- */
.pd-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  background-color: var(--pd-bg);
  background-image:
    linear-gradient(rgba(23,32,43,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23,32,43,.045) 1px, transparent 1px);
  background-size: 24px 24px;
}
.pd-canvas-wrap { position: relative; flex: 1; min-height: 0; }
.pd-canvas-wrap .canvas-container { position: absolute !important; inset: 0; }
.pd-objbar {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: var(--pd-surface);
  border: 1px solid var(--pd-line);
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(23,32,43,.12);
  max-width: calc(100% - 24px);
}
.pd-objbar button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: none;
}
.pd-objbar button svg { width: 20px; height: 20px; }
.pd-objbar button:hover { background: var(--pd-bg); }
.pd-objbar .is-danger:hover { background: #FDECEA; color: var(--pd-bad); }
.pd-quality { display: flex; flex-direction: column; padding: 0 10px; font-size: 12px; line-height: 1.3; border-right: 1px solid var(--pd-line); margin-right: 4px; }
.pd-quality-size { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pd-quality-dpi { white-space: nowrap; display: flex; align-items: center; gap: 5px; }
.pd-quality-dpi::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pd-quality.is-good .pd-quality-dpi { color: var(--pd-good); }
.pd-quality.is-ok .pd-quality-dpi { color: var(--pd-ok); }
.pd-quality.is-bad .pd-quality-dpi { color: var(--pd-bad); font-weight: 600; }

.pd-stage-foot { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 16px 14px; }
.pd-sides { display: inline-flex; padding: 3px; gap: 3px; background: var(--pd-surface); border: 1px solid var(--pd-line); border-radius: 10px; }
.pd-side-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 96px;
  justify-content: center;
  padding: 8px 16px;
  border: 0;
  border-radius: 7px;
  background: none;
  font-weight: 600;
  color: var(--pd-muted);
}
.pd-side-tab[aria-selected="true"] { background: var(--pd-ink); color: #fff; }
.pd-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pd-accent); }
.pd-side-tab[aria-selected="true"] .pd-dot { background: #7FD3DB; }
.pd-hint { margin: 0; font-size: 12px; color: var(--pd-muted); text-align: center; }

/* ---------- Podsumowanie ---------- */
.pd-methods { display: grid; gap: 8px; }
.pd-method {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--pd-line);
  border-radius: 10px;
  cursor: pointer;
}
.pd-method input { accent-color: var(--pd-accent); width: 18px; height: 18px; margin: 0; }
.pd-method-name { font-weight: 600; }
.pd-method-from { font-size: 13px; color: var(--pd-muted); }
.pd-method:has(input:checked) { border-color: var(--pd-accent); background: var(--pd-accent-soft); }

.pd-qty { display: inline-flex; border: 1px solid var(--pd-line); border-radius: 8px; overflow: hidden; }
.pd-qty button { width: 42px; border: 0; background: var(--pd-bg); font-size: 18px; }
.pd-app .pd-qty input { width: 64px; border: 0; border-radius: 0; text-align: center; -moz-appearance: textfield; }
.pd-qty input::-webkit-inner-spin-button { -webkit-appearance: none; }

.pd-breakdown { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin: 6px 0 0; padding: 16px 0 0; border-top: 1px solid var(--pd-line); font-size: 14px; }
.pd-breakdown dt { margin: 0; }
.pd-breakdown dt small { display: block; font-size: 12px; color: var(--pd-muted); }
.pd-breakdown dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pd-breakdown .is-muted { color: var(--pd-muted); }
.pd-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--pd-ink); }
.pd-total strong { font-size: 24px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }

/* ---------- Okna ---------- */
.pd-dialog {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  padding: 20px;
  border: 0;
  border-radius: 14px;
  background: var(--pd-surface);
  color: var(--pd-ink);
  box-shadow: 0 24px 60px rgba(23,32,43,.3);
}
.pd-dialog::backdrop { background: rgba(23,32,43,.55); }
.pd-dialog h2 { font-size: 19px; margin: 0; }
.pd-dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.pd-preview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.pd-preview-grid[aria-busy="true"]:empty { min-height: 300px; }
.pd-preview-item { margin: 0; }
.pd-preview-item img { width: 100%; height: auto; display: block; border-radius: 10px; background: var(--pd-bg); }
.pd-preview-item figcaption { margin-top: 8px; font-weight: 600; font-size: 14px; }
.pd-dialog-sm { width: min(440px, calc(100vw - 32px)); }
.pd-dialog-sm p { color: var(--pd-muted); margin: 10px 0 20px; }
.pd-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

.pd-toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 50;
  max-width: min(520px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--pd-ink);
  color: #fff;
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(23,32,43,.25);
}
.pd-toast.is-bad { background: var(--pd-bad); }
.pd-toast.is-warn { background: #5C3D00; }

.pd-busy { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(232,236,240,.85); }
.pd-busy-box { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 28px; background: var(--pd-surface); border-radius: 14px; box-shadow: 0 12px 40px rgba(23,32,43,.15); text-align: center; max-width: 320px; }
.pd-busy-box p { margin: 0; font-weight: 500; }
.pd-spinner { width: 32px; height: 32px; border: 3px solid var(--pd-accent-soft); border-top-color: var(--pd-accent); border-radius: 50%; animation: pd-spin .8s linear infinite; }
@keyframes pd-spin { to { transform: rotate(360deg); } }

.pd-fatal { margin: 0; padding: 14px 18px; background: #FDECEA; color: var(--pd-bad); font-weight: 600; }

/* ---------- Tablet / telefon ---------- */
@media (max-width: 1200px) {
  .pd-main { grid-template-columns: 76px 290px minmax(0, 1fr) 260px; }
}
@media (max-width: 960px) {
  body.pd-app { height: auto; min-height: 100dvh; overflow: visible; display: block; }
  .pd-top { position: sticky; top: 0; z-index: 20; padding: 8px 10px; gap: 8px; min-height: 56px; }
  .pd-title span { display: none; }
  .pd-title strong { font-size: 15px; }
  #pd-preview-btn span { display: none; }
  #pd-preview-btn { padding: 0 11px; }
  .pd-cart-label { font-size: 14px; }
  .pd-main { display: flex; flex-direction: column; }
  .pd-stage { height: 60vh; min-height: 380px; order: 1; }
  .pd-rail { order: 2; flex-direction: row; justify-content: center; border-right: 0; border-bottom: 1px solid var(--pd-line); padding: 6px; }
  .pd-rail-btn { flex: 1; max-width: 140px; flex-direction: row; justify-content: center; font-size: 14px; padding: 10px; }
  .pd-rail-btn svg { width: 20px; height: 20px; }
  .pd-panel { order: 3; border-right: 0; overflow: visible; }
  .pd-summary { order: 4; border-left: 0; border-top: 8px solid var(--pd-bg); overflow: visible; padding-bottom: 40px; }
  .pd-hint { display: none; }
  .pd-objbar { top: 8px; }
  .pd-objbar button { width: 34px; height: 34px; }
  .pd-grid { grid-template-columns: repeat(4, 1fr); }
  .pd-rail { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; gap: 2px; }
  .pd-rail-btn { flex: 1 1 0; min-width: 50px; max-width: none; flex-direction: column; gap: 2px; font-size: 11px; line-height: 1.15; text-align: center; white-space: normal; padding: 7px 2px; }
}
@media (max-width: 420px) {
  .pd-cart-price { display: none; }
  .pd-grid { grid-template-columns: repeat(3, 1fr); }
  .pd-quality { padding: 0 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .pd-app * { transition: none !important; }
  .pd-spinner { animation-duration: 2.4s; }
}

/* ---------- Full print ---------- */
.pd-tip-top { margin: -6px 0 16px; }
.pd-btn-gap { margin-top: 8px; }
#pd-bg-out { font-variant-numeric: tabular-nums; }
.pd-sides { flex-wrap: wrap; justify-content: center; max-width: 100%; }
@media (max-width: 960px) {
  .pd-side-tab { min-width: 0; padding: 8px 10px; font-size: 13px; }
}
@media (max-width: 960px) {
  .pd-sides { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; max-width: calc(100vw - 32px); scrollbar-width: none; }
  .pd-side-tab { flex: none; }
}


/* ---------- Obrys, kształty ---------- */
.pd-swatch-none { background: #fff linear-gradient(to top right, transparent calc(50% - 1px), var(--pd-bad) calc(50% - 1px), var(--pd-bad) calc(50% + 1px), transparent calc(50% + 1px)); }
#pd-stroke-swatches, #pd-shape-stroke { margin-bottom: 10px; }
.pd-shapes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pd-shape {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: 8px;
  border: 1px solid var(--pd-line);
  border-radius: 8px;
  background: var(--pd-surface);
  color: var(--pd-ink);
}
.pd-shape svg { width: 100%; height: 100%; fill: currentColor; }
.pd-shape:hover { border-color: var(--pd-accent); color: var(--pd-accent); background: var(--pd-accent-soft); }

/* ---------- Drużyna ---------- */
.pd-field-note { margin: -4px 0 12px; padding: 8px 10px; border-radius: 8px; background: #FDEEF3; color: #9C1F4E; }
.pd-app textarea:disabled { background: var(--pd-bg); color: var(--pd-muted); }
.pd-team-add { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pd-fieldopts { margin: -4px 0 18px; padding: 12px; border: 1px solid #F3C4D5; border-radius: 10px; background: #FFF7FA; }
.pd-fieldopts .pd-field { margin-bottom: 8px; }
.pd-check-row { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 6px 0; cursor: pointer; }
.pd-check-row input { accent-color: var(--pd-accent); width: 18px; height: 18px; margin: 0; }
.pd-roster { display: flex; flex-direction: column; gap: 4px; max-height: 340px; overflow-y: auto; margin-bottom: 8px; }
.pd-player {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 46px 24px;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid transparent;
  border-radius: 8px;
}
.pd-player.is-active { border-color: var(--pd-accent); background: var(--pd-accent-soft); }
.pd-player-no { display: none; }
.pd-app .pd-player input, .pd-app .pd-player select { padding: 7px 8px; font-size: 14px; min-width: 0; }
.pd-app .pd-player select { width: 64px; padding: 7px 0 7px 6px; }
.pd-app .pd-player select.is-empty { border-color: var(--pd-bad); color: var(--pd-bad); }
.pd-player-num { text-align: center; }
.pd-player-del { width: 24px; height: 32px; border: 0; border-radius: 6px; background: none; color: var(--pd-muted); font-size: 20px; line-height: 1; }
.pd-player-del:hover { background: #FDECEA; color: var(--pd-bad); }
.pd-roster-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
#pd-paste-text { width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; margin-bottom: 6px; }
.pd-quality-field { color: #9C1F4E; }

#pd-busy-progress { width: 220px; height: 8px; accent-color: var(--pd-accent); }

/* ---------- Podgląd AI ---------- */
.pd-btn-ai svg { color: #7A4FD6; }
.pd-dialog-ai { width: min(980px, calc(100vw - 32px)); }
.pd-dialog-ai.is-single { width: min(640px, calc(100vw - 32px)); }
.pd-ai-sub { margin: -6px 0 14px; color: var(--pd-muted); }
.pd-ai-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pd-ai-grid.is-single { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin: 0 auto; }
.pd-ai-item { margin: 0; }
.pd-ai-item figcaption { margin-top: 8px; font-weight: 600; font-size: 14px; }
.pd-ai-slot {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  aspect-ratio: var(--pd-ai-ratio, 3 / 4);
  border-radius: 12px;
  background: #EEF0F2;
  overflow: hidden;
  text-align: center;
  color: var(--pd-muted);
}
.pd-ai-slot p { margin: 0; padding: 0 20px; font-weight: 500; }
.pd-ai-slot small { font-variant-numeric: tabular-nums; }
.pd-ai-slot.is-error { background: #FDF2F1; color: var(--pd-bad); }
.pd-ai-slot a { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.pd-ai-slot img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pd-ai-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.pd-ai-left { margin: 0; font-size: 14px; color: var(--pd-muted); }
.pd-ai-note { margin: 10px 0 0; font-size: 12px; color: var(--pd-muted); }
.pd-btn:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 960px) {
  #pd-ai-btn span { display: none; }
  #pd-ai-btn { padding: 0 11px; }
}
@media (max-width: 560px) {
  .pd-ai-grid { grid-template-columns: 1fr; }
}

/* Grafika AI */
.pd-gfx-price { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: #FFF7E0; border: 1px solid #F0DCA0; font-size: 13px; line-height: 1.45; }
.pd-gfx-price strong { font-variant-numeric: tabular-nums; }
#pd-gfx-prompt { width: 100%; box-sizing: border-box; resize: vertical; min-height: 88px; margin-bottom: 10px; padding: 10px 12px; border: 1px solid var(--pd-line); border-radius: 10px; font: inherit; }
.pd-gfx-left { margin: 8px 0 12px; font-size: 13px; color: var(--pd-muted); font-variant-numeric: tabular-nums; }
.pd-gfx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.pd-gfx-item { position: relative; border-radius: 10px; overflow: hidden; background: #EEF0F2; border: 1px solid var(--pd-line); }
.pd-gfx-item img { display: block; width: 100%; height: auto; aspect-ratio: var(--r, 1); object-fit: cover; }
.pd-gfx-item.is-loading { display: grid; place-items: center; aspect-ratio: var(--r, 1); font-size: 12px; color: var(--pd-muted); text-align: center; gap: 6px; padding: 8px; }
.pd-gfx-item.is-error { padding: 10px; font-size: 12px; color: var(--pd-bad); background: #FDF2F1; }
.pd-gfx-actions { display: grid; gap: 4px; padding: 6px; background: #fff; }
.pd-gfx-actions button { font: inherit; font-size: 12px; font-weight: 600; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--pd-line); background: #fff; cursor: pointer; }
.pd-gfx-actions button:hover { border-color: var(--pd-ink); }
.pd-gfx-actions button.is-main { background: var(--pd-ink); border-color: var(--pd-ink); color: #fff; }
