/* Подпись фото названием питомника — /podpis/. Дополняет site.css. */

.pd [hidden] { display: none !important; }
.pd { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }

.pd-head { display: flex; flex-direction: column; gap: 18px; padding: clamp(36px, 6vw, 80px) 0 clamp(28px, 4vw, 48px); }
.pd-head h1 { font: 500 clamp(36px, 4.8vw, 64px)/1.04 var(--serif); letter-spacing: -.01em; max-width: 16em; }

.pd-tool {
  display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 32px clamp(24px, 3.5vw, 56px); align-items: start;
  padding-bottom: clamp(40px, 6vw, 80px);
}

/* ——— Настройки ——— */
.pd-controls { display: flex; flex-direction: column; gap: 22px; }
.pd-field { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.pd-field > span, .pd-field legend { font: 13px/1.4 var(--mono); color: var(--ink-3); padding: 0; margin-bottom: 8px; }
.pd-field > span { margin-bottom: 0; }
.pd-field em { font-style: normal; opacity: .7; }
.pd-field input[type="text"] {
  font: 500 17px/1.3 var(--sans); color: var(--ink);
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 0; background: var(--paper);
  width: 100%;
}
.pd-field input[type="text"]:focus { outline: 2px solid var(--ink); outline-offset: -1px; border-color: var(--ink); }

.pd-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.pd-seg label { position: relative; }
.pd-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pd-seg span {
  display: block; padding: 8px 12px; border: 1px solid var(--line);
  font: 14px/1.3 var(--sans); color: var(--ink-2); cursor: pointer; user-select: none;
}
.pd-seg input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.pd-seg input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.pd-seg .f-serif { font-family: var(--serif); font-size: 16px; line-height: 1.15; }
.pd-seg .f-mono { font-family: var(--mono); font-size: 13px; }

.pd-range input { width: 100%; accent-color: var(--ink); }
.pd-range output { color: var(--ink-2); }

.pd-hint { font-size: 14px; line-height: 1.45; color: var(--ink-3); margin-top: 8px; }

.pd-logo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pd-logo-thumb {
  width: 52px; height: 52px; display: block;
  background: repeating-conic-gradient(#e6e6e3 0 25%, #fff 0 50%) 0 0 / 12px 12px;
  border: 1px solid var(--line);
}
.pd-logo-thumb canvas { width: 100%; height: 100%; object-fit: contain; display: block; }
.pd-link { font: 14px/1.3 var(--mono); color: var(--ink-2); background: none; border: 0; padding: 4px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.pd-checks { display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--ink-2); }
.pd-checks input { accent-color: var(--ink); margin-right: 6px; }

/* ——— Просмотр ——— */
.pd-stage { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.pd-drop {
  background: var(--soft); min-height: 360px;
  display: flex; align-items: center; justify-content: center;
  outline: 1px dashed transparent; outline-offset: -12px; transition: outline-color .15s;
}
.pd-drop.over { outline-color: var(--ink-3); }
.pd-drop canvas { display: block; max-width: 100%; max-height: 72vh; width: auto; height: auto; }
.pd-drop canvas { touch-action: none; }               /* перетаскивание подписи пальцем не листает страницу */
.pd-drop canvas.grab, .pd-drop canvas.grabbing { cursor: move; }   /* стрелки в четыре стороны */
.pd-drop canvas:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.pd-empty { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 40px 16px; text-align: center; }
.pd-empty > p:first-child { font: 400 clamp(22px, 2.4vw, 30px)/1.2 var(--serif); }

.pd-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  font: 15px/1.3 var(--mono); padding: 12px 18px; cursor: pointer;
  border: 1px solid var(--ink); background: var(--paper); color: var(--ink);
}
.pd-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.pd-btn.primary { background: var(--ink); color: var(--paper); }
.pd-btn.ghost { border-color: var(--line); color: var(--ink-2); }
.pd-btn:hover { opacity: .88; }
.pd-btn:focus-within, .pd-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.pd-btn[disabled] { opacity: .5; cursor: progress; }

.pd-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.pd-strip button {
  flex: 0 0 auto; padding: 0; border: 2px solid transparent; background: var(--soft); cursor: pointer;
  width: 76px; height: 76px;
}
.pd-strip button.on { border-color: var(--ink); }
.pd-strip img { width: 100%; height: 100%; object-fit: cover; }

.pd-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-status { font: 14px/1.4 var(--mono); color: var(--ink-3); min-height: 1.4em; }

/* ——— Пояснения ——— */
.pd-notes {
  border-top: 1px solid var(--line); padding: clamp(36px, 5vw, 64px) 0;
}
.pd-notes h2 { font: 500 clamp(24px, 2.4vw, 32px)/1.15 var(--serif); margin-bottom: 12px; }
.pd-notes p { color: var(--ink-2); max-width: 34em; }
.pd-notes .cover-links { margin-top: 18px; }

@media (max-width: 860px) {
  .pd-tool { grid-template-columns: minmax(0, 1fr); }
  .pd-stage { order: -1; }
  .pd-drop { min-height: 240px; }
  .pd-notes { grid-template-columns: minmax(0, 1fr); }
}

/* На телефоне перетаскивать некуда */
@media (pointer: coarse) { .pd-empty > p:first-child { display: none; } }
