/* 活动详情 + 弹窗 共享样式 (detail.js), index 与 admin 两页加载。
   变量带 fallback: 两页 palette 一致, 缺省也能看。 */

#jdWrap {
  position: fixed; inset: 0; z-index: 9999;
  top: 0; right: 0; bottom: 0; left: 0;   /* 老 WebView 不识别 inset 简写, 四边单独写 */
  background: rgba(31, 41, 51, 0.45);
  display: flex; align-items: center; justify-content: center;
}
#jdWrap[hidden] { display: none !important; }   /* !important: 防任何加载时序下弹窗残影盖死页面 */
.jd-sheet {
  background: var(--card, #fff); width: calc(100% - 24px); max-width: 560px;
  border-radius: 14px; max-height: 80vh;
  display: flex; flex-direction: column;
}
.jd-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid var(--line, #e4e7eb);
  font-size: 16px; font-weight: 600;
}
#jdClose {
  border: 0; background: none; font-size: 22px; color: var(--muted, #616e7c);
  padding: 0 4px; line-height: 1;
}
#jdBody { overflow-y: auto; padding: 8px 16px 20px; }
.jd-back {
  border: 1px solid var(--line, #e4e7eb); background: var(--card, #fff);
  color: var(--muted, #616e7c);
  border-radius: 8px; padding: 4px 10px; font-size: 13px; margin-bottom: 4px;
}

/* 详情主体: 大地图在上 → 地点 → 名字/时间 → 类型主题年龄 → 简介名额 */
#jdMap { width: 100%; height: 260px; border-radius: 8px; }
.jd-place { margin-top: 6px; }
.jd-act p, .jd-ditem p {
  margin-top: 4px; color: var(--muted, #616e7c); font-size: 13px;
}
.jd-act p.reg, .jd-ditem p.reg { color: var(--accent, #c2410c); font-weight: 600; }
.jd-name { font-size: 15px; font-weight: 600; margin-top: 6px; }
.jd-link { color: var(--accent, #c2410c); text-decoration: none; white-space: nowrap; }
.jd-ext { min-height: 0; }

/* 基本情况介绍 (富文本, 白名单消毒后注入): 段落间留白 */
.jd-intro { margin-top: 6px; }
.jd-intro p {
  margin-top: 6px; color: var(--muted, #616e7c); font-size: 13px; line-height: 1.7;
  word-break: break-word; text-align: justify;
}

/* 列表条目 (index 当天列表 / admin 园所活动列表) */
.jd-ditem { padding: 10px 0; border-bottom: 1px solid var(--line, #e4e7eb); cursor: pointer; }
.jd-ditem:active { opacity: 0.6; }
.jd-ditem:last-child { border-bottom: 0; }
.jd-ditem .jd-name { margin-top: 0; }
.jd-sub { color: var(--muted, #616e7c); font-size: 13px; margin-top: 2px; }
.jd-empty { text-align: center; color: var(--muted, #616e7c); padding: 30px 0; font-size: 14px; }

.jd-badge {
  font-size: 11px; border-radius: 4px; padding: 1px 5px;
  background: var(--accent-soft, #fff1e7); color: var(--accent, #c2410c);
}

/* 同一天活动列表 (详情弹窗底部, 决策参考)。条目样式同 jd-ditem,
   但类名独立: 宿主页 document 级监听按 .jd-ditem 接管条目点击 */
.jd-same { margin-top: 12px; border-top: 1px solid var(--line, #e4e7eb); }
.jd-same-h {
  font-size: 13px; font-weight: 600; color: var(--muted, #616e7c);
  padding: 10px 0 2px;
}
.jd-sitem { padding: 10px 0; border-bottom: 1px solid var(--line, #e4e7eb); cursor: pointer; }
.jd-sitem:active { opacity: 0.6; }
.jd-sitem:last-child { border-bottom: 0; }
.jd-sitem .jd-name { margin-top: 0; }
.jd-sitem p { margin-top: 4px; color: var(--muted, #616e7c); font-size: 13px; }
.jd-sitem p.reg { color: var(--accent, #c2410c); font-weight: 600; }
.jd-badge.wait { background: #fdf3d7; color: #8a6d1a; }
.jd-full { color: #c0392b; font-weight: 600; }
