/* ==========================================================================
   AuthNexus Design · gallery 自身样式（非资产，仅样式画廊页面使用）
   ========================================================================== */

.g-wrap { max-width: 1100px; margin: 0 auto; padding: 24px 24px 120px; }

.g-head {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 0 12px;
  background: var(--paper);
  border-bottom: 1px solid var(--border);
}
.g-head h1 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.g-head .g-sub { font-size: 13px; color: var(--muted-text); }
.g-head .push { margin-left: auto; }

.g-sec { margin-top: 56px; }
.g-sec > h2 {
  font-size: 16px; font-weight: 600;
  padding-bottom: 10px; margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.g-sec > h2 code { font-family: var(--font-mono); font-size: 12px; font-weight: 400; color: var(--muted-text); margin-left: 8px; }

.g-cells { display: grid; gap: 16px; }
.g-cells--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-cells--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) {
  .g-cells--2, .g-cells--3 { grid-template-columns: minmax(0, 1fr); }
}

.g-cell {
  padding: 18px; min-width: 0;
  border: 1px dashed var(--hairline-hover);
  border-radius: var(--r);
  background: var(--bone);
}
.g-label {
  display: block;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--muted-text); margin-bottom: 12px;
}

.g-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.g-stack { display: flex; flex-direction: column; gap: 12px; }
.g-note { font-size: 13px; color: var(--muted-text); line-height: 1.6; margin-top: 10px; }

/* 浮层演示：默认隐藏，由 gallery.js 打开 */
.g-hidden { display: none !important; }

/* ---------- 嵌入模式（组件详情页 iframe）----------
   只留「组件自己的演示」：区块标题栏（h2）、虚线演示格（g-cell 的边框/底色）、
   页头与引言全部去壳，避免详情页里多出一块无关内容。 */
body.is-embed .g-head { display: none; }
body.is-embed .g-wrap { padding: 4px 18px 22px; }
body.is-embed .g-sec { margin-top: 10px; }
body.is-embed .g-sec > h2 { display: none; }
body.is-embed .g-cell { border-color: transparent; background: transparent; }
body.is-embed > .g-wrap > .g-note { display: none; }

/* ---------- 挂载机制演示（OverlaySlot / OverlayHost）：画廊私有卡片 ---------- */
.g-probe {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2;
  width: min(340px, 86vw); display: grid; gap: 10px; justify-items: start;
  padding: 20px; border: 1px solid var(--hairline-hover); border-radius: var(--r);
  background: var(--paper); box-shadow: 0 14px 40px rgba(0, 0, 0, .16);
  transition: opacity .18s var(--ease), transform .18s var(--ease);
}
.g-probe.is-closing { opacity: 0; transform: translate(-50%, -50%) scale(.98); }
.g-probe strong { font-size: 14.5px; }
.g-probe span { font-size: 12.5px; color: var(--muted-text); line-height: 1.7; }

/* ---------- 路由过渡演示卡片 ---------- */
.g-fade-stage { padding: 6px 0 2px; }
.g-fade-card {
  display: grid; gap: 3px; padding: 16px 18px;
  border: 1px solid var(--border); border-radius: var(--r); background: var(--paper);
}
.g-fade-card strong { font-size: 14px; }
.g-fade-card span { font-size: 12.5px; color: var(--muted-text); }
