/* 工具框架容器与入口（W3-C，mireal_c29-glm_tmp-260926-08）。
   只管：iframe 覆盖层、浮窗（红点/计数/退出）、入口网格、记录弹窗。
   第 2 版视觉（mireal_c36-glm_tmp-261008-06）：入口改玻璃卡片、弹窗改象牙玻璃，
   配色沿 styles.css 的 :root 令牌；布局与交互不动。 */

.tool-frame-root {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: #0d1117;
}

.tool-frame-iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.tool-frame-float {
  position: absolute;
  right: 16px;
  top: 16px;
  max-width: 320px;
  font-size: 14px;
}

.tool-frame-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(226, 214, 194, 0.9);
}

.tool-frame-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: transparent;
}

.tool-frame-dot.on {
  background: #d7353a; /* 有图没存好：红点（契约 9.4） */
}

.tool-frame-panel {
  display: none;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
}

.tool-frame-panel.expanded {
  display: block;
}

.tool-frame-note {
  margin: 0 0 8px;
}

.tool-frame-actions {
  display: flex;
  gap: 8px;
}

/* 入口网格 */
.tool-entries {
  display: grid;
  gap: 14px;
}

.tool-complaint {
  display: grid;
  gap: 4px;
  font-size: 14px;
}

.tool-entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

/* 工具入口：玻璃卡片（设计稿 glass-card-interactive 形态）。
   第 3 版减字：40px Lucide 主入口图标＋目录短标签；置灰态加锁形；
   置灰原因全文在按钮 title 提示与 .tool-entry-note.vh（读屏与测试仍可取）。 */
.tool-entry {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 16px 16px 14px;
  border: 1.5px solid rgba(228, 216, 196, 0.8);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 26px -10px rgba(184, 151, 88, 0.1);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.tool-entry:hover {
  border-color: #CBAF82;
  background: rgba(255, 255, 255, 0.96);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -8px rgba(184, 151, 88, 0.16);
}

.tool-entry button {
  width: 100%;
  flex-direction: column;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
  min-height: 118px;
}

.tool-entry button .icon-lg { order: -1; }

.tool-entry.disabled button .icon-lg { opacity: 0.55; }

.tool-entry.disabled {
  opacity: 0.55;
}

.tool-entry.disabled:hover {
  transform: none;
  border-color: rgba(228, 216, 196, 0.8);
  background: rgba(255, 255, 255, 0.82);
}

.tool-entry-note {
  font-size: 12px;
  color: #9E9488;
}

/* 会话里的缩略图条（P9：咨询进行中显示本场已存） */
.session-effect-images {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.session-effect-images img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(226, 214, 194, 0.9);
}

/* 咨询记录弹窗：象牙玻璃 */
.record-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(44, 36, 29, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.record-dialog {
  background: #FCFAF6;
  color: #2C2621;
  border: 1px solid #D6C4AA;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(45, 38, 32, 0.22);
  width: min(720px, 92vw);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  padding: 20px 22px;
}

.record-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.record-head h3 {
  margin: 0;
  flex: 1;
}

.record-body {
  overflow: auto;
  margin-top: 10px;
  display: grid;
  gap: 14px;
}

.record-session-heading {
  margin: 0 0 6px;
  font-weight: 600;
}

.effect-image-card {
  margin: 0 0 8px;
}

.effect-image-card figcaption {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.effect-image-kind {
  font-weight: 600;
  color: #9a3412; /* 「AI 模拟效果图」标注与实拍照片区分（宪法 §13 第 11 条） */
}

.effect-image-card img {
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(226, 214, 194, 0.9);
}

.effect-image-card.collapsed img {
  display: none; /* PO-5：收起只藏本屏显示，不删档案 */
}
