/* ============================================================================
   SNS shared quick-look card — D-EXPCARD-0716 §1 (Q-EXP-1, 2026-07-16)
   ----------------------------------------------------------------------------
   The ONE sitewide drill-down/quick-look standard. Structure:
     .exp-scrim > .exp-card > (.exp-close, [.exp-head], .exp-body, [.exp-actions])
   Loaded per-route via explicit <link> on opt-in routes (NOT chrome-injected).
   Deliberately UNLAYERED: legacy exp-* rules live inside @layer components in
   core.css (dashboard, pre-extraction); unlayered rules win the cascade, so
   every structural property the legacy rules set is restated here.
   Sizes/breakpoint extracted from PR #2632 (merged main). Scrim, ✕≥44px,
   64px head, gray border per D-EXPCARD-0716 §1.
   ========================================================================== */

/* --- Scrim: full viewport incl. under the bottom tab bar; card centered --- */
.exp-scrim{
  position:fixed;
  inset:0;
  z-index:2000; /* above chrome: sidebar/tabbar <100, More sheet 1200 */
  background:rgba(0,0,0,.6);
  -webkit-backdrop-filter:blur(4px);
  backdrop-filter:blur(4px);
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  transition:opacity .22s cubic-bezier(0.16,1,0.3,1);
}
.exp-scrim.is-open{opacity:1}

/* --- Card (restates every property the legacy @layer .exp-card sets) ------ */
.exp-scrim .exp-card{
  position:relative;
  left:auto;
  top:auto;
  margin:0;
  z-index:auto;
  display:flex;
  flex-direction:column;
  gap:14px;
  width:min(760px,92vw);
  max-width:100%;
  max-height:86vh;
  overflow:hidden;               /* .exp-body is the ONLY scroll region */
  padding:28px;
  background:var(--bg-surface,#0A0A0A);
  border:1px solid var(--gray-border,#2A2A2A);
  border-radius:12px;
  box-shadow:0 16px 56px rgba(0,0,0,.75);
  pointer-events:auto;
  will-change:transform,opacity;
  /* fade+scale ~0.22s per spec */
  transform:scale(.96);
  opacity:0;
  transition:transform .22s cubic-bezier(0.16,1,0.3,1),opacity .22s cubic-bezier(0.16,1,0.3,1);
}
.exp-scrim.is-open .exp-card{transform:none;opacity:1}

/* Breakpoint flip per PR #2632 (880/881) */
@media (max-width:880px){
  .exp-scrim .exp-card{
    width:min(92vw,420px);
    max-height:78dvh;
    border-radius:16px;
    padding:24px 18px 18px;
  }
}

/* --- Close: >=44x44 tap target, pinned to the card (never scrolls) -------- */
.exp-scrim .exp-close{
  position:absolute;
  top:8px;
  right:8px;
  z-index:3;
  width:44px;
  height:44px;
  min-width:44px;
  min-height:44px;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,0,0,.15);
  border:1px solid rgba(255,0,0,.5);
  border-radius:8px;
  color:var(--white-bright,#F5F5F5);
  cursor:pointer;
  font-size:18px;
  line-height:1;
  transition:background .2s ease,transform .15s ease;
}
.exp-scrim .exp-close:hover{background:rgba(255,0,0,.35);transform:scale(1.06)}
.exp-scrim .exp-close:active{transform:scale(.94)}
.exp-scrim .exp-close:focus-visible{outline:2px solid var(--red-bright,#FF3B30);outline-offset:2px}

/* --- Head: non-scrolling; 64px round headshot (shield onerror fallback) --- */
.exp-scrim .exp-head{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
  padding-right:52px; /* clear the pinned ✕ */
}
.exp-scrim .exp-head .exp-headshot{
  width:64px;
  height:64px;
  flex:0 0 64px;
  border-radius:50%;
  object-fit:cover;
  object-position:center top;
  border:2px solid var(--red-primary,#FF1A1A);
  background:var(--black-soft,#111111);
  box-shadow:none;
}
.exp-scrim .exp-head .exp-headline{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1 1 auto}
.exp-scrim .exp-head .exp-name{
  font-family:var(--f-display,"Graduate","Oswald",sans-serif);
  font-size:24px;
  line-height:1.1;
  letter-spacing:.04em;
  margin:0;
  color:var(--text-primary,#F5F5F5);
  text-align:left;
}
.exp-scrim .exp-head .exp-meta{
  font-family:var(--f-mono,ui-monospace,monospace);
  font-size:14px;
  color:var(--text-muted,#C2C2C2);
  margin:0;
  letter-spacing:.08em;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
}

/* --- Body: the ONLY scroll region ----------------------------------------- */
.exp-scrim .exp-body{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
}

/* --- Actions: <=3 context buttons; 1-col <=480px (pl-modal precedent) ----- */
.exp-scrim .exp-actions{
  flex:0 0 auto;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(0,1fr));
  gap:10px;
  margin-top:4px;
}
@media (max-width:480px){
  .exp-scrim .exp-actions{grid-template-columns:1fr}
}

/* --- Scroll-lock while open ------------------------------------------------ */
body.exp-open{overflow:hidden}

/* --- Reduced motion -------------------------------------------------------- */
@media (prefers-reduced-motion:reduce){
  .exp-scrim,
  .exp-scrim .exp-card,
  .exp-scrim .exp-close{transition:none}
  .exp-scrim .exp-card{transform:none}
}
