/* The keepsake preview: the store page's detail window (title, big preview, design picker).
   One home for its look, used by the keepsakes store (keepsakes.html) and the Christmas Set's
   magnifying glass (christmas-set.html). Moved out of keepsakes.html, Josh's Claude, 14 Nov 2026. */
.ks-card-comp { font-family:var(--f-data); font-size:var(--t-xs); letter-spacing:.1em;
  text-transform:uppercase; color:var(--gold-deep); }

/* ---- modal ---- */
.ks-modal { position:fixed; inset:0; z-index:200; display:flex; align-items:center;
  justify-content:center; padding:var(--s3); }
.ks-modal[hidden] { display:none; }
.ks-modal-backdrop { position:absolute; inset:0; background:rgba(11,13,15,.62);
  backdrop-filter:blur(2px); }
.ks-modal-panel { position:relative; z-index:1; width:100%; max-width:860px;
  max-height:92vh; max-height:92dvh; overflow-y:auto; overscroll-behavior:contain; background:var(--paper); border-radius:var(--r-card);
  box-shadow:var(--shadow-lg); -webkit-overflow-scrolling:touch;
  animation:ks-pop .22s ease; }
@keyframes ks-pop { from { opacity:0; transform:translateY(12px) scale(.98); } to { opacity:1; transform:none; } }
.ks-modal-close { position:sticky; top:0; float:right; z-index:3; width:44px; height:44px;
  display:flex; align-items:center; justify-content:center; margin:var(--s2) var(--s2) 0 0;
  border-radius:50%; background:transparent; border:0; color:var(--ink); padding:0; }
/* drawn like every other pop-up's X (brand.css .mds-x; Josh, 7 Nov 2026) */
.ks-modal-close:hover, .ks-modal-close:focus-visible { background:rgba(20,24,28,.08); }
.ks-modal-close svg { width:20px; height:20px; }
.ks-modal-body { padding:var(--s4); }
@media (max-width:560px) { .ks-modal-body { padding:var(--s3); } }

.ks-detail-head { margin-bottom:var(--s3); padding-right:48px; }
.ks-detail-head .ks-card-comp { display:block; margin-bottom:6px; }
.ks-detail-head h2 { font-size:clamp(1.5rem,4vw,var(--t-2xl)); }
.ks-detail-score { font-family:var(--f-data); font-size:var(--t-sm); color:var(--ink-700);
  margin-top:6px; }

.ks-step-label { font-family:var(--f-data); font-size:var(--t-xs); letter-spacing:.1em;
  text-transform:uppercase; color:var(--label); margin:var(--s3) 0 var(--s1); }

.ks-variants { display:grid; grid-template-columns:repeat(3,1fr); gap:var(--s2); }
@media (min-width:560px) { .ks-variants { grid-template-columns:repeat(4,1fr); } }
.ks-variant { padding:0; border:1.5px solid var(--line); border-radius:var(--r-card);
  overflow:hidden; background:var(--paper-card); text-align:center; }
.ks-variant:hover { border-color:var(--label); }
.ks-variant.selected { border-color:var(--ink); box-shadow:0 0 0 1px var(--ink); }
.ks-variant img { width:100%; aspect-ratio:2/3; object-fit:cover; background:var(--mount); }
/* landscape (commentary) design: letterbox it on the grey mount so the picker
   grid stays a uniform 2:3 and the whole design still shows, un-cropped */
.ks-variant.is-landscape img { object-fit:contain; }
.ks-variant .ks-variant-name { display:block; padding:8px 6px; font-family:var(--f-head);
  font-weight:600; font-size:var(--t-xs); line-height:1.2; color:var(--ink); }

.ks-preview { margin:0 auto var(--s3); max-width:340px; }
.ks-preview img { width:100%; border-radius:var(--r-card); box-shadow:var(--shadow);
  background:var(--mount); }

.ks-detail-actions { margin-top:var(--s4); }

/* framed mockups in the design-style picker show whole, not cover-cropped */
.ks-variant img { object-fit:contain; }
