#primer-pechati {
  --ink: #1e293b;
  --muted: #475569;
  --gold: #f5a623;
  --source-ratio: 1;
  --paper-ratio: 1.5;
  --crop-width: 100%;
  --crop-height: 66.66667%;
  --frame-height: clamp(154px, 16vw, 217px);
  width: 100%;
  max-width: 1300px;
  margin: 40px auto 30px;
  scroll-margin-top: 96px;
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
  text-align: left;
}
.pf-frame *, .pf-frame *::before, .pf-frame *::after { box-sizing: border-box; }
.pf-frame [hidden] { display: none !important; }
.pf-frame .pf-frame-heading { margin: 0 0 22px; }
.pf-frame .pf-frame-heading h2 {
  margin: 0 0 12px;
  border-left: 8px solid var(--gold);
  padding-left: 20px;
  font: 800 clamp(2rem, 5vw, 2.8rem)/1.13 Inter, Arial, sans-serif;
  letter-spacing: -.035em;
  color: #202030;
}
.pf-frame .pf-frame-heading p, .pf-frame-cell > p, .pf-frame-cell noscript p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.48;
}
.pf-frame .pf-frame-heading p { font-size: clamp(15px, 1.4vw, 17px); }
.pf-frame-panel {
  padding: clamp(16px, 2.4vw, 32px);
  background: #fff;
  border-radius: 26px;
  border: 1px solid #e0e4e8;
  box-shadow: 0 10px 32px rgba(30,41,59,.07);
}
.pf-frame-controls { display: flex; align-items: flex-start; gap: clamp(16px, 3vw, 38px); margin-bottom: 24px; }
.pf-frame-choice { flex: 1; min-width: 0; }
.pf-frame-format { flex: none; }
.pf-frame .pf-frame-label { display: block; margin: 0 0 8px; color: var(--ink); font-size: 14px; font-weight: 700; line-height: 1.35; }
.pf-frame select {
  display: block; max-width: 100%; min-height: 48px; padding: 8px 32px 8px 12px;
  margin: 0; border: 1px solid #c9d0d6; border-radius: 11px;
  background: #fff; color: var(--ink); font: 600 15px/1.35 Inter, Arial, sans-serif;
  cursor: pointer; color-scheme: light;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #475569 50%), linear-gradient(135deg, #475569 50%, transparent 50%);
  background-position: right 15px center, right 10px center;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.pf-frame-format select { width: 100%; }
.pf-frame-choice > select { width: 100%; }
.pf-frame-thumbs { display: none; margin: 0; padding: 0; border: 0; min-width: 0; }
.pf-frame-sr, .pf-frame-thumbs input {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  border: 0; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.pf-frame-thumb { position: relative; display: block; min-width: 0; cursor: pointer; }
.pf-frame-thumb > span {
  display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 5px 8px 5px 5px;
  border: 1px solid #d6dbe0; border-radius: 11px; background: white;
}
.pf-frame-thumb img { display: block; width: 34px; height: 34px; object-fit: cover; border-radius: 6px; }
.pf-frame-thumb strong, .pf-frame-thumb small { display: block; font-family: inherit; line-height: 1.25; }
.pf-frame-thumb strong { font-size: 13px; font-weight: 650; }
.pf-frame-thumb small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.pf-frame-thumb input:checked + span { background: #fff7e6; border-color: #b16a08; box-shadow: inset 0 0 0 1px #b16a08; }
.pf-frame-thumb:hover > span { border-color: #a67731; }
.pf-frame :is(input, select):focus-visible, .pf-frame-thumb input:focus-visible + span {
  outline: 3px solid #165591; outline-offset: 3px;
}
.pf-frame-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.7vw, 23px); }
.pf-frame .pf-frame-cell { display: flex; flex-direction: column; min-width: 0; margin: 0; padding: 0; }
.pf-frame-cell figcaption { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; min-height: 32px; margin: 0 0 8px; }
.pf-frame-cell figcaption h3 { margin: 0; color: var(--ink); font: 750 clamp(18px, 1.75vw, 24px)/1.2 Inter, Arial, sans-serif; letter-spacing: -.025em; }
.pf-frame-ratio { display: inline-block; padding: 2px 6px; font: 600 12px/1.2 Inter, Arial, sans-serif; color: var(--muted); border: 1px solid #d5dbe1; border-radius: 5px; }
.pf-frame-stage {
  display: flex; align-items: center; justify-content: center; position: relative;
  height: calc(var(--frame-height) + 32px); padding: 16px;
  border-radius: 13px; background: #e5e8e9;
  background-image: radial-gradient(#85929455 .7px, transparent .85px); background-size: 7px 7px;
}
.pf-frame-source .pf-frame-stage { background-color: #3b4850; background-image: radial-gradient(#eef2f133 .7px, transparent .85px); }
.pf-frame-picture, .pf-frame-sheet {
  display: block; position: relative; flex: none; overflow: hidden;
  box-shadow: 0 2px 3px #1520272b, 0 6px 14px #15202726;
}
.pf-frame-picture { width: min(100%, calc(var(--frame-height) * var(--source-ratio))); aspect-ratio: var(--source-ratio); }
.pf-frame-sheet { width: min(100%, calc(var(--frame-height) * var(--paper-ratio))); aspect-ratio: var(--paper-ratio); background: #fff; }
.pf-frame .pf-frame-stage img { display: block; width: 100%; height: 100%; border: 0; border-radius: 0; padding: 0; margin: 0; object-position: center; }
.pf-frame-picture img, .pf-frame-fill img { object-fit: cover; }
.pf-frame-fit img { object-fit: contain; }
.pf-frame-crop {
  position: absolute; left: 50%; top: 50%; width: var(--crop-width); height: var(--crop-height);
  transform: translate(-50%, -50%); pointer-events: none; box-shadow: 0 0 0 800px #131a24a3;
}
.pf-frame-crop span { position: absolute; inset: 0; border: 1.5px dashed #fff; box-shadow: inset 0 0 0 1px #28323b70; }
.pf-frame-cell > p, .pf-frame-cell noscript p { margin: 11px 0 0; text-wrap: pretty; }
.pf-frame .pf-frame-guide { display: flex; width: fit-content; min-height: 44px; margin: 0; align-items: center; gap: 8px; cursor: pointer; color: var(--muted); font: 550 14px/1.35 Inter, Arial, sans-serif; }
.pf-frame-guide input { flex: none; width: 17px; height: 17px; margin: 0; appearance: auto; accent-color: #885312; }
.pf-frame-aside { display: inline-block; margin-top: 6px; text-decoration: underline; text-underline-offset: 3px; }
@media(min-width: 1120px) {
  .pf-frame-thumbs { display: flex; flex-wrap: wrap; gap: 6px; }
  .pf-frame-choice > select { display: none; }
  .pf-frame-choice > .pf-frame-label { pointer-events: none; }
}
@media(max-width: 1119px) {
  .pf-frame-controls { justify-content: flex-start; gap: 16px; }
  .pf-frame-choice { flex: 0 1 245px; }
  .pf-frame-format { flex: 0 1 180px; }
}
@media(min-width: 1120px) and (max-width: 1399px) {
  .pf-frame-controls { gap: 16px; }
  .pf-frame-thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
  .pf-frame-thumb > span { display: block; padding: 4px 5px 6px; }
  .pf-frame-thumb img { width: 100%; height: 32px; margin-bottom: 5px; }
  .pf-frame-thumb strong { font-size: 12px; }
}
@media(max-width: 680px) {
  #primer-pechati { margin: 28px auto 25px; scroll-margin-top: 75px; --frame-height: 130px; }
  .pf-frame .pf-frame-heading { margin-bottom: 16px; }
  .pf-frame .pf-frame-heading h2 { font-size: clamp(27px, 7vw, 35px); border-width: 5px; padding-left: 12px; }
  .pf-frame .pf-frame-heading p { font-size: 15px; }
  .pf-frame-panel { padding: clamp(10px, 3vw, 16px); border-radius: 18px; }
  .pf-frame-controls { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); gap: 8px; margin-bottom: 14px; }
  .pf-frame .pf-frame-label { font-size: 13px; margin-bottom: 5px; }
  .pf-frame select { width: 100%; min-width: 0; min-height: 44px; font-weight: 550; font-size: 16px; padding: 5px 24px 5px 7px; }
  .pf-frame-row { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .pf-frame-source { grid-column: 1/-1; }
  .pf-frame-cell figcaption { min-height: 22px; margin-bottom: 6px; }
  .pf-frame-cell figcaption h3 { font-size: 17px; }
  .pf-frame-stage { height: calc(var(--frame-height) + 18px); padding: 9px; border-radius: 9px; }
  .pf-frame-source .pf-frame-stage { --frame-height: 150px; }
  .pf-frame-cell > p { margin-top: 7px; font-size: 13px; }
}
@media(max-width: 370px) {
  .pf-frame-controls { grid-template-columns: minmax(0,1fr); }
  .pf-frame-choice, .pf-frame-format { display: grid; grid-template-columns: 90px minmax(0,1fr); align-items: center; }
  .pf-frame .pf-frame-label { margin: 0; }
}
