#custom-templates {
  background: #faf9f6;
  color: #262925;
  padding: clamp(52px, 6vw, 94px) clamp(18px, 4.5vw, 72px);
}
#custom-templates .ud-sample-room { max-width: 1232px; margin: auto; }
#custom-templates h2 { font-size: clamp(30px, 3.7vw, 56px); font-weight: 650; line-height: 1.15; letter-spacing: -.055em; }
#custom-templates .ud-intro { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 25px; }
#custom-templates .ud-intro p { font-size: 15px; line-height: 1.65; margin-top: 11px; max-width: 560px; }
#villa-lp .ud-prints-link { display: inline-flex; min-height: 44px; align-items: center; font-size: 14px; font-weight: 600; line-height: 1.4; text-decoration: underline; text-underline-offset: 4px; color: inherit; }
#custom-templates .ud-intro .ud-prints-link { flex: none; }
.ud-proof-display {
  background: #eceae4;
  padding: clamp(18px, 3vw, 42px);
  display: grid;
  grid-template-columns: repeat(4,minmax(0,2fr)) minmax(0,1fr);
  gap: clamp(12px, 1.75vw, 24px);
}
.ud-proof-line { display: contents; }
.ud-proof-display figure { min-width: 0; margin: 0; }
.ud-proof-display a { display: block; background: white; box-shadow: 0 2px 5px #26251c22; cursor: zoom-in; }
.ud-proof-display img { width: 100%; display: block; height: auto; background: white; }
#custom-templates .ud-proof-display figcaption { font-size: 13px; color: #383c36; padding-top: 9px; line-height: 1.45; }
.ud-proof-display figcaption strong { font-size: 15px; }
.ud-proof-display figcaption span { display:block; }
.ud-sample-instruction { margin-top: 9px; font-size: 13px; color: #4c5048; }
#ud-frame-book { margin-top: clamp(54px,6vw,86px); scroll-margin-top: 20px; }
.ud-book-heading { display:flex; gap:22px; align-items:end; justify-content:space-between; margin-bottom:20px; }
#ud-frame-book h3 { font-size: clamp(29px,3.5vw,48px); line-height:1.12; font-weight:650; letter-spacing:-.055em; }
.ud-book-heading p { margin-top:9px; font-size:15px; line-height:1.65; }
.ud-book-pick, .ud-book-filters button, .ud-viewer button { font:inherit; line-height:1.3; cursor:pointer; }
.ud-book-pick { display:inline-flex; gap:14px; align-items:center; background:#eeede7; border:1px solid #bcbeb4; color:#272c26; min-height:58px; padding:5px 17px 5px 8px; border-radius:3px; flex-shrink:0; font-weight:650; }
.ud-draw-samples { display:block; position:relative; width:55px; height:48px; }
.ud-draw-samples img { position:absolute; display:block; left:20px; top:2px; width:15px; height:45px; background:#fff; box-shadow:0 1px 3px #24271d36; transform:rotate(4deg); }
.ud-draw-samples img:first-child { left:8px; transform:rotate(-16deg); }
.ud-draw-samples img:last-child { left:32px; transform:rotate(17deg); }
.ud-book-filters { display:flex; gap:0 13px; flex-wrap:wrap; border-block:1px solid #c5c6bb; padding:2px 0; margin-bottom:13px; }
.ud-book-filters button { background:transparent; color:#4a4d45; padding:8px 3px; border:0; border-bottom:2px solid transparent; min-height:44px; font-size:14px; }
.ud-book-filters button[aria-pressed="true"] { color:#242824; font-weight:700; border-bottom-color:currentColor; }
.ud-book-result { font-size:13px; min-height:22px; margin-bottom:10px; color:#4a4d45; }
.ud-proof-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(75px,1fr)); gap:15px 6px; list-style:none; padding:14px 10px; margin:0; background:#eeede8; }
.ud-proof-grid li { min-width:0; }
.ud-proof-grid a { display:block; color:#30332f; text-align:center; font-variant-numeric:tabular-nums; cursor:zoom-in; }
.ud-proof-grid .ud-frame-holder { display:flex; justify-content:center; align-items:center; height:108px; }
.ud-proof-grid img { display:block; width:auto; height:auto; max-width:96%; max-height:100%; background:white; box-shadow:0 1px 4px #282a2430; }
.ud-proof-grid .ud-frame-number { display:block; font-size:12px; line-height:1.4; margin-top:4px; letter-spacing:.06em; }
.ud-book-foot { display:flex; justify-content:space-between; gap:16px; align-items:center; margin-top:8px; }
.ud-book-foot p { font-size:13px; line-height:1.5; }
#custom-templates [hidden] { display:none!important; }
#custom-templates :is(a,button):focus-visible, .ud-prints-link:focus-visible { outline:3px solid #3e524a; outline-offset:3px; }
.ud-viewer { border:0; margin:auto; padding:12px 16px 16px; width:min(94vw,620px); max-width:96vw; max-height:94vh; max-height:94dvh; background:#f7f6f2; color:#222720; }
.ud-viewer::backdrop { background:#151814d9; }
.ud-viewer-head,.ud-viewer-controls { display:flex; align-items:center; justify-content:space-between; gap:8px; }
#custom-templates .ud-viewer h3 { font-size:17px; line-height:1.4; letter-spacing:-.02em; }
.ud-viewer button { border:0; color:inherit; background:transparent; min-width:44px; min-height:44px; padding:7px 10px; }
.ud-viewer-stage { display:flex; justify-content:center; align-items:center; min-height:0; height:min(65vh,680px); height:min(65dvh,680px); margin-block:5px; }
.ud-viewer-stage img { display:block; min-width:0; min-height:0; max-width:100%; max-height:100%; width:auto; height:auto; background:white; object-fit:contain; }
.ud-viewer-controls { justify-content:center; font-size:14px; }
.ud-viewer-controls [data-indicator] { min-width:48px; text-align:center; }
.ud-viewer .ud-viewer-draw { border-left:1px solid #c2c4bb; padding-left:16px; }
.ud-viewer [role=status] { text-align:center; font-size:13px; }
@media(max-width:700px) {
  #custom-templates { padding:46px 18px; }
  #custom-templates .ud-intro { display:block; margin-bottom:13px; }
  .ud-proof-display { display:block; padding:17px 14px; }
  .ud-proof-line { display:grid; align-items:start; gap:12px; }
  .ud-proof-line:first-child { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ud-proof-line:last-child { margin-top:19px; grid-template-columns:minmax(0,2fr) minmax(0,2fr) minmax(0,1fr); }
  #custom-templates .ud-proof-display figcaption { font-size:12px; padding-top:6px; }
  .ud-proof-display figcaption strong { font-size:14px; }
  .ud-book-heading { display:block; margin-bottom:12px; }
  .ud-book-pick { margin-top:10px; }
  .ud-book-filters { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:0 5px; }
  .ud-proof-grid { grid-template-columns:repeat(6,minmax(0,1fr)); padding:12px 5px; gap:12px 3px; }
  .ud-proof-grid .ud-frame-holder { height:88px; }
  .ud-viewer { padding:9px 10px; }
}
@media(max-width:370px){.ud-proof-grid {grid-template-columns:repeat(5,minmax(0,1fr));}}
