/* Портфолио: стили поверх kit.css. Цвета — из темы (по умолчанию «Галерея»: тёплая бумага, чёрный, красный акцент).
   Принцип — как в хорошей галерее: картинки крупно и без рамок, подписи мелко, много воздуха, линии только там, где они делят смысл. */
.kit { --good: #1f9d5c; --warn: #c48a00; --info: #2f6fde; --full: calc(var(--gutter) * -1); }
.link-btn { background: none; border: 0; padding: 4px 0; color: inherit; opacity: .75; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font: inherit; }
.pf-low { color: var(--accent); font-weight: 600; }

/* ---------- обложка ---------- */
.pf-strip { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; margin-top: 12px; padding: 10px 14px; border: 1px dashed var(--line); border-radius: var(--card-radius); background: none; color: var(--muted); font-size: 13px; text-align: left; cursor: pointer; }
.pf-strip.hot { border: 1px solid var(--accent); color: var(--text); font-weight: 600; }
.pf-strip svg { width: 16px; height: 16px; flex: none; }
.pf-hero { margin-top: 0; }
.pf-strip + .pf-hero { margin-top: 12px; }
.pf-cover { margin-inline: var(--full); aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface); }
.pf-cover img { width: 100%; height: 100%; object-fit: cover; }
.pf-id { position: relative; padding-top: 18px; }
.pf-ava { width: 76px; height: 76px; object-fit: cover; border-radius: var(--card-radius); border: 3px solid var(--bg); background: var(--surface); margin: -56px 0 0; position: relative; }
.no-cover .pf-id { padding-top: 28px; }
.no-cover .pf-ava { margin-top: 0; border: 0; }
.pf-name { margin: 14px 0 0; font-size: 34px; line-height: 1.02; letter-spacing: -.01em; overflow-wrap: anywhere; }
.pf-ava + .pf-name { margin-top: 16px; }
.pf-role { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin: 12px 0 0; font-size: 15px; font-weight: 500; }
.pf-city { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 400; }
.pf-city svg { width: 15px; height: 15px; }
.pf-tagline { margin: 14px 0 0; font-size: 17px; line-height: 1.45; max-width: 34ch; }
.pf-cta { display: flex; gap: 8px; margin-top: 22px; }
.pf-cta-btn { flex: 1; min-height: 50px; }
.pf-icon, .pf-actions .icon-btn { width: 50px; height: 50px; border-radius: var(--btn-radius); border: 2px solid var(--line); color: var(--text); }
.pf-icon svg, .pf-actions .icon-btn svg { width: 20px; height: 20px; }
.pf-socials { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 16px; }
.pf-socials button { background: none; border: 0; padding: 4px 0; font-size: 14px; color: var(--text); text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 1px; text-underline-offset: 5px; cursor: pointer; }

/* ---------- секции ---------- */
.pf-sec { margin-top: 44px; }
.pf-sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.pf-sec-head h2 { font-size: 22px; margin: 0; }
.pf-page-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 20px; }
.pf-page-top h1 { font-size: 26px; }
.pf-page-top .btn svg { width: 15px; height: 15px; }
.pf-lead { margin: 14px 0 0; font-size: 16px; line-height: 1.5; }

/* ---------- категории ---------- */
.pf-cats { display: flex; gap: 20px; overflow-x: auto; margin: 0 var(--full) 18px; padding: 0 var(--gutter); border-bottom: 1px solid var(--line); scrollbar-width: none; }
.pf-cats::-webkit-scrollbar { display: none; }
.pf-cats button { position: relative; flex: none; padding: 8px 0 12px; border: 0; background: none; color: var(--muted); font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.pf-cats button.on { color: var(--text); }
.pf-cats button.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); }
.pf-cats sup, .pf-filter sup { margin-left: 3px; font-size: 10px; font-weight: 600; color: var(--muted); }
.pf-tagline-filter { display: flex; align-items: center; gap: 12px; margin: -4px 0 14px; font-size: 14px; }

/* ---------- мозаика ---------- */
.pf-mosaic { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.pf-mosaic.one { grid-template-columns: 1fr; }
.pf-col { display: grid; gap: 22px; min-width: 0; }
.pf-tile { display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.pf-tile-img { position: relative; display: block; overflow: hidden; border-radius: var(--card-radius); background: var(--surface); }
.pf-tile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.pf-tile:hover .pf-tile-img img { transform: scale(1.025); }
.pf-tile-cap { display: grid; gap: 1px; padding-top: 9px; }
.pf-tile-cap b { font-size: 14px; font-weight: 600; line-height: 1.25; }
.pf-tile-cap span { font-size: 12px; color: var(--muted); }
.pf-tile-heart, .pf-tile-feat { position: absolute; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--accent); }
.pf-tile-heart { right: 8px; bottom: 8px; }
.pf-tile-feat { left: 8px; top: 8px; color: #e8a300; }
.pf-tile-heart svg, .pf-tile-feat svg { width: 15px; height: 15px; }
.pf-row { display: grid; grid-auto-flow: column; grid-auto-columns: 44%; gap: 12px; overflow-x: auto; margin-inline: var(--full); padding: 0 var(--gutter) 4px; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
.pf-row::-webkit-scrollbar { display: none; }
.pf-row > * { scroll-snap-align: start; }

/* ---------- отзывы ---------- */
.pf-reviews { display: grid; grid-auto-flow: column; grid-auto-columns: 84%; gap: 12px; overflow-x: auto; margin-inline: var(--full); padding: 0 var(--gutter) 4px; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
.pf-reviews::-webkit-scrollbar { display: none; }
.pf-reviews.one { grid-auto-columns: 100%; }
.pf-review { margin: 0; scroll-snap-align: start; display: grid; align-content: space-between; gap: 16px; padding: 20px; border-radius: var(--card-radius); background: var(--surface); }
.pf-review blockquote { margin: 0; font-size: 15px; line-height: 1.55; }
.pf-review blockquote::before { content: "«"; display: block; margin-bottom: 8px; font: 34px/.8 var(--font-display); color: var(--accent); }
.pf-review figcaption { display: flex; gap: 10px; align-items: center; }
.pf-review figcaption img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.pf-review figcaption > span { display: grid; justify-items: start; line-height: 1.25; }
.pf-review figcaption b { font-size: 14px; }
.pf-review .link-btn { padding: 2px 0 0; font-size: 12px; text-align: left; }
.pf-review-list { display: grid; gap: 12px; margin-top: 4px; }
.pf-review-list + .btn { margin-top: 12px; }

/* ---------- финальный призыв ---------- */
.pf-closing { margin: 52px var(--full) 0; padding: 32px var(--gutter) 28px; background: var(--text); color: var(--bg); display: grid; gap: 10px; }
.pf-closing h2 { font-size: 24px; line-height: 1.1; }
.pf-closing p { margin: 0 0 8px; color: inherit; opacity: .72; }
.pf-closing .btn-primary { min-height: 52px; }

/* ---------- галерея ---------- */
.pf-gal { position: relative; margin-inline: var(--full); background: var(--surface); }
.pf-gal-track { display: flex; aspect-ratio: 4 / 5; max-height: 68vh; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.pf-gal-track::-webkit-scrollbar { display: none; }
.pf-slide { flex: 0 0 100%; height: 100%; padding: 0; border: 0; background: none; scroll-snap-align: center; scroll-snap-stop: always; cursor: zoom-in; }
.pf-slide img { width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.pf-slide.fit img { object-fit: contain; }
.pf-count { position: absolute; left: 14px; bottom: 14px; padding: 4px 9px; border-radius: var(--card-radius); background: rgba(17, 17, 17, .62); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .04em; pointer-events: none; }
.pf-arrow, .pf-expand, .pf-float-back { position: absolute; display: grid; place-items: center; padding: 0; border: 0; cursor: pointer; }
.pf-arrow { top: 50%; width: 38px; height: 38px; margin-top: -19px; border-radius: 50%; background: rgba(255, 255, 255, .9); color: #111; transition: opacity .2s; }
.pf-arrow.prev { left: 10px; }
.pf-arrow.next { right: 10px; }
.pf-arrow[disabled] { opacity: 0; pointer-events: none; }
.pf-arrow svg { width: 18px; height: 18px; }
.pf-expand { right: 12px; bottom: 12px; width: 34px; height: 34px; border-radius: var(--card-radius); background: rgba(17, 17, 17, .62); color: #fff; }
.pf-expand svg { width: 17px; height: 17px; }
.pf-float-back { top: 12px; left: 12px; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .9); color: #111; }
.pf-float-back svg { width: 18px; height: 18px; }
.pf-thumbs { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 0; scrollbar-width: none; }
.pf-thumbs::-webkit-scrollbar { display: none; }
.pf-thumbs button { position: relative; flex: 0 0 50px; height: 50px; padding: 0; border: 0; background: var(--surface); opacity: .42; cursor: pointer; transition: opacity .2s; }
.pf-thumbs button.on { opacity: 1; }
.pf-thumbs button.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent); }
.pf-thumbs img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- карточка работы ---------- */
.pf-work-body { padding-top: 22px; }
.pf-work-title { margin: 0; font-size: 26px; line-height: 1.1; overflow-wrap: anywhere; }
.pf-admin-line { margin: 8px 0 0; color: var(--muted); }
.pf-admin-line .link-btn { padding: 0; }
.pf-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 12px; margin: 20px 0 0; padding: 14px 0; border-block: 1px solid var(--line); }
.pf-meta dt { font-size: 12px; color: var(--muted); }
.pf-meta dd { margin: 2px 0 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.pf-desc { margin: 18px 0 0; font-size: 16px; line-height: 1.6; }
.pf-story { display: grid; gap: 18px; margin-top: 28px; }
.pf-story section { display: grid; grid-template-columns: 88px 1fr; gap: 12px; }
.pf-story h3 { margin: 2px 0 0; font-size: 13px; font-weight: 700; color: var(--accent); }
.pf-story p { margin: 0; }
.pf-video { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 24px; padding: 10px; border: 1px solid var(--line); border-radius: var(--card-radius); background: none; color: var(--text); text-align: left; cursor: pointer; }
.pf-video > span:last-child { display: grid; }
.pf-video-ic { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: var(--card-radius); background: var(--text); color: var(--bg); }
.pf-video-ic svg { width: 18px; height: 18px; }
.pf-tags { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 20px 0 0; }
.pf-tags button { padding: 0; border: 0; background: none; color: var(--muted); font-size: 14px; cursor: pointer; }
.pf-tags button:hover { color: var(--text); }
.pf-actions { position: sticky; z-index: 5; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); display: flex; gap: 8px; margin-top: 18px; padding: 10px 0; background: var(--bg); }
.pf-want { flex: 1; min-height: 50px; }
.pf-like.on { color: var(--accent); border-color: var(--accent); }
.pf-like.pop svg { animation: pf-pop .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pf-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* ---------- полноэкранный просмотр ---------- */
.pf-lb { position: absolute; inset: 0; display: grid; grid-template-rows: auto 1fr auto; background: #0d0d0d; color: #fff; animation: pf-fade .18s ease-out; }
@keyframes pf-fade { from { opacity: 0; } }
.pf-lb-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)); font-size: 14px; font-weight: 600; }
.pf-lb-img { min-height: 0; display: grid; place-items: center; cursor: pointer; }
.pf-lb-img img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.pf-lb-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
.pf-lb-title { flex: 1; min-width: 0; text-align: center; font-size: 13px; opacity: .72; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-lb .icon-btn { border-color: rgba(255, 255, 255, .3); color: #fff; }
.pf-lb .icon-btn[disabled] { opacity: .2; }

/* ---------- услуги ---------- */
.pf-pkgs { margin-top: 16px; }
.pf-pkg { display: grid; gap: 10px; justify-items: start; padding: 24px 0; border-top: 1px solid var(--line); }
.pf-pkg:last-child { border-bottom: 1px solid var(--line); }
.pf-pkg.hl { margin-inline: var(--full); padding-inline: var(--gutter); background: var(--surface); border-top-color: transparent; }
.pf-pkg.hl + .pf-pkg { border-top-color: transparent; }
.pf-pkg p { margin: 0; }
.pf-pkg-flag { font-size: 12px; font-weight: 700; color: var(--accent); }
.pf-pkg-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; width: 100%; }
.pf-pkg-head h2 { flex: 1 1 55%; margin: 0; font-size: 17px; line-height: 1.25; }
.pf-price { font: 16px/1.3 var(--font-display); white-space: nowrap; }
.pf-pkg-dur { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; }
.pf-pkg-dur svg { width: 15px; height: 15px; }
.pf-inc { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pf-inc li { position: relative; padding-left: 20px; }
.pf-inc li::before { content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 2px; background: var(--accent); }
.pf-pkg .btn { margin-top: 6px; }
.pf-faq { border-bottom: 1px solid var(--line); }
.pf-faq summary { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; font-weight: 600; cursor: pointer; list-style: none; }
.pf-faq summary::-webkit-details-marker { display: none; }
.pf-faq summary::after { content: "+"; flex: none; font-size: 20px; line-height: 1; color: var(--muted); }
.pf-faq[open] summary::after { content: "−"; }
.pf-faq p { margin: 0 0 16px; }

/* ---------- обо мне ---------- */
.pf-admin-entry { margin-top: 14px; }
.pf-my { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; margin-top: 14px; padding: 14px 16px; border: 1px solid var(--accent); border-radius: var(--card-radius); background: none; color: var(--text); text-align: left; cursor: pointer; }
.pf-my > span { display: grid; }
.pf-my svg { width: 18px; height: 18px; flex: none; }
.pf-about { display: flex; gap: 16px; align-items: center; padding-top: 24px; }
.pf-about-ph { width: 92px; height: 92px; flex: none; object-fit: cover; border-radius: var(--card-radius); background: var(--surface); }
.pf-about h1 { font-size: 24px; line-height: 1.08; overflow-wrap: anywhere; }
.pf-about p { margin: 6px 0 0; }
.pf-bio { margin: 22px 0 0; font-size: 17px; line-height: 1.55; }
.pf-sec .prose { margin: 0; }
.pf-clients { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
.pf-clients li, .pf-awards li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.pf-clients li { font-weight: 600; }
.pf-awards { list-style: none; margin: 0; padding: 0; }
.pf-post { display: grid; gap: 6px; justify-items: start; padding: 18px 0; border-top: 1px solid var(--line); }
.pf-sec-head + .pf-post { border-top: 0; padding-top: 0; }
.pf-post img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--card-radius); margin-bottom: 6px; }
.pf-post h3 { margin: 0; font-size: 17px; line-height: 1.3; }
.pf-post p { margin: 0; }
.pf-posts { margin-top: 8px; }
.pf-sub { align-items: flex-start; margin-top: 16px; padding: 14px 16px; border-radius: var(--card-radius); background: var(--surface); }
.pf-contacts { display: grid; }
.pf-contact { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.pf-contact:first-child { border-top: 1px solid var(--line); }
.pf-contact > svg { width: 20px; height: 20px; flex: none; color: var(--accent); }
.pf-contact > span { display: grid; min-width: 0; }
.pf-contact b { font-weight: 600; overflow-wrap: anywhere; }
.pf-contact .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- мои заявки ---------- */
.pf-my-list { display: grid; margin-top: 8px; }
.pf-my-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.pf-my-row > span:first-child { display: grid; min-width: 0; }
.pf-my-row .btn { grid-column: 1 / -1; justify-self: start; }
.pf-pill { padding: 2px 8px; border: 1px solid currentColor; border-radius: var(--btn-radius); font-size: 12px; font-weight: 700; white-space: nowrap; color: var(--accent); }
.pf-pill.st-discuss { color: var(--warn); }
.pf-pill.st-work, .pf-pill.st-paid, .pf-pill.st-sent { color: var(--info); }
.pf-pill.st-done, .pf-pill.st-received { color: var(--good); }
.pf-pill.st-declined, .pf-pill.st-canceled { color: var(--muted); }

/* ---------- бриф ---------- */
.pf-attached { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 10px; border-radius: var(--card-radius); background: var(--surface); }
.pf-attached img { width: 52px; height: 64px; object-fit: cover; flex: none; }
.pf-attached > span { display: grid; flex: 1; min-width: 0; }
.pf-attached b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-radio .chip { min-height: 38px; }
.chips.radio input { position: absolute; opacity: 0; pointer-events: none; }
.field textarea.pf-short { min-height: 64px; }
.pf-refs img { width: 72px; height: 72px; }
.pf-file { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 14px; border: 1.5px dashed var(--line); border-radius: var(--card-radius); color: var(--text); font-weight: 600; cursor: pointer; }
.pf-file:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.pf-file input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.pf-file svg { width: 18px; height: 18px; color: var(--accent); }
.pf-cal { padding: 12px; border: 1px solid var(--line); border-radius: var(--card-radius); }
.pf-cal-head { display: flex; justify-content: space-between; align-items: center; }
.pf-cal-head b { font-size: 15px; }
.pf-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin-top: 10px; }
.pf-dow { padding: 2px 0 4px; font-size: 11px; text-align: center; color: var(--muted); }
.pf-day { aspect-ratio: 1; padding: 0; border: 0; border-radius: var(--card-radius); background: none; color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; }
.pf-day:hover:not([disabled]) { background: var(--surface); }
.pf-day.past { opacity: .28; cursor: default; }
.pf-day.busy { color: var(--muted); text-decoration: line-through; background: repeating-linear-gradient(135deg, transparent 0 5px, var(--line) 5px 6px); }
.pf-day.hold { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.pf-day.today { box-shadow: inset 0 0 0 1.5px var(--text); }
.pf-day.sel, .pf-day.sel:hover:not([disabled]) { background: var(--accent); color: var(--on-accent); text-decoration: none; }
.pf-day[disabled] { cursor: default; }
.pf-cal-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 10px 0 0; color: var(--muted); }
.pf-cal-legend i { display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; border-radius: 2px; }
.pf-cal-legend .free { border: 1px solid var(--line); }
.pf-cal-legend .busy { background: repeating-linear-gradient(135deg, transparent 0 3px, var(--muted) 3px 4px); }
.pf-cal-legend .hold { background: color-mix(in srgb, var(--accent) 35%, transparent); }
.pf-cal-sel { margin: 8px 0 0; }
.pf-cal-sel .link-btn { padding: 0 0 0 6px; }
.pf-holds { margin-top: 12px; }
.pf-hold-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 0; border: 0; border-top: 1px solid var(--line); background: none; color: var(--text); text-align: left; cursor: pointer; }
.pf-hold-row .small { flex: 1; }
.pf-hold-row svg { width: 16px; height: 16px; }
.pf-done { display: grid; justify-items: start; gap: 12px; padding-top: 28px; }
.pf-done-ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: var(--card-radius); background: var(--accent); color: var(--on-accent); }
.pf-done-ic svg { width: 28px; height: 28px; }
.pf-done h2 { font-size: 26px; }
.pf-done p { margin: 0 0 6px; font-size: 16px; }

/* ---------- магазин ---------- */
.pf-shop { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 12px; margin-top: 18px; }
.pf-prod { display: grid; gap: 4px; align-content: start; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.pf-prod-img { display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--card-radius); background: var(--surface); }
.pf-prod-img img { width: 100%; height: 100%; object-fit: cover; }
.pf-prod.out .pf-prod-img img { filter: grayscale(1); opacity: .5; }
.pf-prod > b { margin-top: 6px; font-size: 14px; font-weight: 600; line-height: 1.25; }
.pf-prod-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 8px; }
.pf-prod-meta .num { font-weight: 700; }
.pf-prod-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin: 10px 0 0; }
.pf-prod-price b { font: 24px/1.1 var(--font-display); }
.pf-order { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.pf-order p { margin: 0; }
.pf-qty { display: flex; justify-content: space-between; align-items: center; }
.pf-qty > span { font-size: 13px; color: var(--muted); }
.pf-stepper { display: flex; align-items: center; gap: 14px; }
.pf-stepper b { min-width: 26px; text-align: center; font-size: 18px; }
.pf-soldout { margin: 22px 0 0; padding: 14px 16px; border-radius: var(--card-radius); background: var(--surface); }

/* ---------- мастерская ---------- */
.pf-aw { margin-top: 10px; }
.pf-aw-row { display: grid; grid-template-columns: 56px 1fr; gap: 8px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.pf-aw-img { grid-row: span 2; width: 56px; height: 70px; padding: 0; border: 0; background: var(--surface); cursor: pointer; align-self: start; }
.pf-aw-img img { width: 100%; height: 100%; object-fit: cover; }
.pf-aw-main { display: grid; min-width: 0; line-height: 1.35; }
.pf-aw-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-feat-on { color: #e8a300; border-color: #e8a300; }
.pf-ph-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.pf-ph { position: relative; aspect-ratio: 1; background: var(--surface); }
.pf-ph img { width: 100%; height: 100%; object-fit: cover; }
.pf-ph > span { position: absolute; top: 4px; left: 4px; padding: 1px 6px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 11px; }
.pf-ph-acts { position: absolute; right: 4px; bottom: 4px; display: flex; gap: 4px; }
.pf-ph-acts .icon-btn { width: 30px; height: 30px; border: 0; background: rgba(255, 255, 255, .92); color: #111; }
.pf-ph-acts .icon-btn svg { width: 15px; height: 15px; }
.pf-add-ph { margin-top: 16px; cursor: pointer; }
.pf-add-ph svg { width: 18px; height: 18px; }
.pf-filter { margin-top: 14px; }
.pf-brief { display: grid; gap: 10px; margin-top: 12px; padding: 14px; border-radius: var(--card-radius); background: var(--surface); border-left: 3px solid var(--accent); }
.pf-brief.st-discuss { border-left-color: var(--warn); }
.pf-brief.st-work, .pf-brief.st-paid, .pf-brief.st-sent { border-left-color: var(--info); }
.pf-brief.st-done, .pf-brief.st-received { border-left-color: var(--good); }
.pf-brief.st-declined, .pf-brief.st-canceled { border-left-color: var(--line); }
.pf-brief header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pf-brief p { margin: 0; }
.pf-facts { display: grid; gap: 4px; margin: 0; }
.pf-facts div { display: grid; grid-template-columns: 88px 1fr; gap: 8px; }
.pf-facts dt { font-size: 13px; color: var(--muted); }
.pf-facts dd { margin: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.pf-brief-refs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.pf-brief-refs button { flex: 0 0 64px; height: 64px; padding: 0; border: 0; background: var(--bg); cursor: zoom-in; }
.pf-brief-refs img { width: 100%; height: 100%; object-fit: cover; }
.pf-brief-links { display: grid; justify-items: start; }
.pf-brief-links .link-btn { padding: 2px 0; text-align: left; overflow-wrap: anywhere; }
.pf-brief-contact { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pf-st .chip { min-height: 32px; padding: 0 10px; font-size: 13px; }
.pf-note { min-height: 40px; font-size: 13px; background: var(--bg); }
.pf-brief-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pf-rv-row { display: grid; gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.pf-rv-row.pending { padding-left: 12px; border-left: 3px solid var(--accent); }
.pf-rv-row p { margin: 0; }
.pf-kpi { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 16px 0 0; }
.pf-kpi div { display: grid; gap: 2px; align-content: start; padding: 12px; border-radius: var(--card-radius); background: var(--surface); }
.pf-kpi b { font: 24px/1.1 var(--font-display); }
.pf-kpi span { font-size: 12px; color: var(--muted); }
.pf-days { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; align-items: end; height: 96px; padding-top: 16px; }
.pf-days span { position: relative; display: flex; align-items: flex-end; height: 100%; }
.pf-days i { display: block; width: 100%; min-height: 2px; background: var(--accent); }
.pf-days em { position: absolute; top: -15px; left: -4px; right: -4px; text-align: center; font-size: 10px; font-style: normal; color: var(--muted); }
.pf-top { display: grid; }
.pf-top-row { display: grid; grid-template-columns: 20px 44px 1fr; gap: 10px; align-items: center; width: 100%; padding: 8px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); text-align: left; cursor: pointer; }
.pf-top-row img, .pf-top-row > span:nth-child(2) { width: 44px; height: 44px; object-fit: cover; background: var(--surface); }
.pf-top-n { font-size: 13px; color: var(--muted); }
.pf-top-main { display: grid; min-width: 0; }
.tbl-wrap { overflow-x: auto; }
.pf-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.pf-tbl th { padding: 6px 6px 6px 0; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); }
.pf-tbl td { padding: 9px 6px 9px 0; border-bottom: 1px solid var(--line); }
.pf-tbl td.num, .pf-tbl th:not(:first-child) { text-align: right; }
.pf-code { display: block; margin: 8px 0; padding: 8px 10px; background: var(--surface); font-size: 12px; overflow-wrap: anywhere; }

/* ---------- окно «в Telegram откроется…» ---------- */
.pf-over { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, .6); }
.pf-over-box { display: grid; gap: 10px; justify-items: center; width: min(320px, 100%); padding: 20px; border-radius: 14px; background: #fff; color: #111; text-align: center; }
.pf-over-box code { font-size: 12px; overflow-wrap: anywhere; color: #555; }
.pf-over-box .btn { color: #111; border-color: #ccc; }

@media (max-width: 360px) {
  .pf-name { font-size: 28px; }
  .pf-story section { grid-template-columns: 1fr; gap: 4px; }
}
@media (min-width: 480px) { .pf-row { grid-auto-columns: 36%; } }
@media (prefers-reduced-motion: reduce) {
  .pf-tile-img img, .pf-arrow, .pf-thumbs button { transition: none; }
  .pf-like.pop svg, .pf-lb { animation: none; }
}

/* кнопка выбора файла во встроенных формах */
.kit input[type="file"].input { padding: 8px; font-size: 13px; color: var(--muted); }
.kit input[type="file"].input::file-selector-button { margin-right: 10px; padding: 6px 12px; border: 1.5px solid var(--text); border-radius: var(--btn-radius); background: none; color: var(--text); font: 600 13px var(--font-body); cursor: pointer; }
.pf-send { color: var(--accent); border-color: var(--accent); }
