/* PDR Gallery section — every selector is scoped under .pdr-gallery (P1-1 fix).
   Nothing in this file can touch the host site's own .grid/.case/.badge/.chip/.shot. */
.pdr-gallery{
  --ink:#0b0b0c; --panel:#121214; --line:rgba(255,255,255,.09);
  --gold:#c9a227; --gold-soft:#e3c76a; --text:#f2f1ee; --muted:#a5a29b;
  background:var(--ink); color:var(--text);
  padding:clamp(2.5rem,6vw,5.5rem) clamp(1rem,4vw,3rem);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans SC","Helvetica Neue",Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
}
.pdr-gallery .wrap{max-width:1180px;margin:0 auto}
.pdr-gallery .eyebrow{
  display:inline-block;letter-spacing:.22em;text-transform:uppercase;
  font-size:.72rem;color:var(--gold);border:1px solid rgba(201,162,39,.35);
  padding:.35rem .7rem;border-radius:999px;margin-bottom:1.1rem;
}
.pdr-gallery h2{
  font-size:clamp(1.6rem,3.4vw,2.5rem);line-height:1.15;margin:0 0 .6rem;
  font-weight:600;letter-spacing:-.01em;
}
.pdr-gallery .lede{color:var(--muted);max-width:56ch;margin:0 0 .5rem;font-size:.98rem;line-height:1.7}
.pdr-gallery .lede.en{font-size:.9rem;opacity:.85}
.pdr-gallery .rule{height:1px;background:linear-gradient(90deg,var(--gold),transparent 60%);margin:1.6rem 0 2.2rem;opacity:.55}

.pdr-gallery .grid{display:grid;gap:clamp(1rem,2.2vw,1.75rem);grid-template-columns:1fr}
@media (min-width:900px){ .pdr-gallery .grid{grid-template-columns:repeat(2,minmax(0,1fr))} }

.pdr-gallery .case{
  background:var(--panel);border:1px solid var(--line);border-radius:14px;
  overflow:hidden;display:flex;flex-direction:column;
  transition:border-color .25s ease, transform .25s ease;
}
.pdr-gallery .case:hover{border-color:rgba(201,162,39,.4);transform:translateY(-2px)}
.pdr-gallery .case-head{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.85rem 1rem .1rem}
.pdr-gallery .chip{
  font-size:.68rem;letter-spacing:.16em;text-transform:uppercase;
  color:var(--gold-soft);border:1px solid rgba(201,162,39,.4);
  border-radius:999px;padding:.2rem .55rem;
}
.pdr-gallery .case-tag{font-size:.72rem;color:var(--muted)}

.pdr-gallery .pair{position:relative;display:grid;grid-template-columns:1fr 1fr;gap:2px;padding:2px;background:var(--line)}
.pdr-gallery .shot{position:relative;margin:0;overflow:hidden;background:#000;aspect-ratio:3/4;cursor:zoom-in}
.pdr-gallery .shot img{width:100%;height:100%;object-fit:cover;object-position:var(--pos,50% 50%);display:block}
.pdr-gallery .shot.after img{filter:saturate(1.03)}
.pdr-gallery .shot:focus-visible{outline:2px solid var(--gold);outline-offset:2px}

/* WCAG AA fix (P2-5): near-opaque backing + light text, >= 4.5:1 even over white paint */
.pdr-gallery .badge{
  position:absolute;left:.45rem;bottom:.45rem;margin:0;
  display:inline-flex;align-items:center;gap:.35rem;
  font-size:.7rem;letter-spacing:.12em;text-transform:uppercase;
  padding:.26rem .52rem;border-radius:6px;font-weight:600;
  background:rgba(8,8,10,.93);border:1px solid rgba(255,255,255,.18);
}
.pdr-gallery .badge span{letter-spacing:0;text-transform:none;font-size:.7rem;font-weight:400;opacity:1}
.pdr-gallery .badge-before{color:#ffd9d1}
.pdr-gallery .badge-after{color:#f6e6b4}

.pdr-gallery .divider{
  position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
  width:30px;height:30px;border-radius:50%;display:grid;place-items:center;
  background:var(--ink);border:1px solid rgba(201,162,39,.5);
  color:var(--gold-soft);font-size:.85rem;pointer-events:none;z-index:2;
}
.pdr-gallery .case-body{padding:1rem 1.15rem 1.35rem;display:flex;flex-direction:column;gap:.35rem}
.pdr-gallery .case-body .panel{
  margin:0;font-size:.72rem;letter-spacing:.12em;text-transform:uppercase;color:var(--gold);
}
.pdr-gallery .case-body h3{margin:0;font-size:1.02rem;line-height:1.4;font-weight:600}
.pdr-gallery .case-body .en{margin:0;font-size:.86rem;color:var(--muted);line-height:1.5}
.pdr-gallery .case-body .desc{margin:.45rem 0 0;font-size:.84rem;line-height:1.75;color:#cfccc5}
.pdr-gallery .case-body .desc.en{font-size:.79rem;color:#9b9892;margin-top:.15rem}

@media (max-width:560px){
  .pdr-gallery .grid{gap:1rem}
  .pdr-gallery .badge{font-size:.64rem;padding:.22rem .42rem}
  .pdr-gallery .divider{width:24px;height:24px;font-size:.7rem}
}
@media (prefers-reduced-motion:reduce){
  .pdr-gallery .case{transition:none}
  .pdr-gallery .case:hover{transform:none}
}

/* Lightbox: unique id, never collides with host page styles. */
dialog#pdr-zoom{
  border:0;padding:0;background:rgba(6,6,7,.94);max-width:100vw;max-height:100vh;
  width:100vw;height:100vh;color:#f2f1ee;
}
dialog#pdr-zoom::backdrop{background:rgba(6,6,7,.94)}
dialog#pdr-zoom figure{margin:0;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.8rem;padding:1rem}
dialog#pdr-zoom img{max-width:min(96vw,760px);max-height:80vh;width:auto;height:auto;object-fit:contain;border-radius:10px;box-shadow:0 20px 60px rgba(0,0,0,.6)}
dialog#pdr-zoom figcaption{font-size:.82rem;color:#a5a29b;text-align:center;max-width:70ch;padding:0 1rem}
dialog#pdr-zoom .close{
  position:absolute;top:.6rem;right:.9rem;background:transparent;color:#e3c76a;
  border:1px solid rgba(201,162,39,.5);border-radius:999px;font-size:.75rem;
  letter-spacing:.12em;padding:.4rem .8rem;cursor:pointer;
}
