/* ========================================
   通用组件样式 · 解读页 / 弹窗 / 交互
======================================== */

.lock-blur {
  filter: blur(6px);
  user-select: none;
  pointer-events: none;
}

.fade-in {
  animation: fade .5s ease-out;
}

@keyframes fade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.nakshatra-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-gold-400);
  display: inline-block;
}

.tab-active {
  color: var(--color-ink-900);
  border-bottom: 2px solid var(--color-gold-500);
}

.tab {
  color: #6b6280;
  padding-bottom: 6px;
  cursor: pointer;
}

details > summary {
  list-style: none;
  cursor: pointer;
}

details > summary::-webkit-details-marker {
  display: none;
}

/* 模块加载占位（真实加载前的骨架）*/
.module-loading {
  min-height: 80px;
  background: linear-gradient(90deg, #f5ecda 0%, #fbf7f0 50%, #f5ecda 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 12px;
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* 隐藏横向滚动条但保留功能（Tab/表格手机版用） */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* 移动端字号优化：避免输入框 < 16px 触发 iOS 自动缩放 */
@media (max-width: 640px) {
  input, select, textarea {
    font-size: 16px !important;
  }
}

/* iOS / Safari 修复：datetime-local / date / time 默认会超出容器 */
input[type="datetime-local"],
input[type="date"],
input[type="time"] {
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  display: block;
  line-height: 1.4;
  text-align: left;
  background-color: white;
  color: #1a1625;
  /* iOS 默认会给 datetime-local 加左右各 8px 的内部 padding，需要归零 */
  padding-left: 12px;
  padding-right: 12px;
  font-family: inherit;
}

/* 关键：归零 iOS 内部伪元素的 padding/margin，避免显示溢出 */
input[type="datetime-local"]::-webkit-date-and-time-value,
input[type="date"]::-webkit-date-and-time-value,
input[type="time"]::-webkit-date-and-time-value {
  text-align: left;
  margin: 0;
  padding: 0;
  min-width: 0;
  width: 100%;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* iOS Safari 隐藏 datetime-local 默认右侧空白和占位 */
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  margin: 0;
  padding: 0;
  opacity: 0.5;
}

/* iOS 上 datetime-local 文本可能因为 ime/locale 撑出，强制截断 */
input[type="datetime-local"] {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 让所有输入框严格遵守容器宽度 */
input, select, textarea {
  box-sizing: border-box;
  max-width: 100%;
}

/* 防止解读区底部那条 mx-auto + style margin 双向冲突 */
@media (max-width: 640px) {
  body { -webkit-text-size-adjust: 100%; }
}
