/* ============================================================================
   iosd.top 设计系统之上的最小补丁
   —— 只补「数据渲染」需要的东西，不覆盖 app.css / extra.css 的任何 token。
   主题色、圆角、阴影、字体全部沿用 iosd 原值（indigo #4f46e5）。
   ========================================================================== */

/* iosd 的 app.css / extra.css 里没有 .hidden 工具类，这里补上（空状态/无数据区依赖它） */
.hidden { display: none !important; }

/* 应用图标：tintColor 兜底背景 + 图片盖在首字之上（图片加载失败才露出字母） */
.app-icon {
  position: relative;
}
.app-icon[data-tint] {
  background: var(--tint, #6366f1);
}
.app-icon > img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.app-icon .ico-letter {
  position: relative;
  z-index: 0;
}

/* 骨架屏 */
.app-skeleton {
  width: 100%;
  height: 74px;
  border-radius: 12px;
  background: linear-gradient(90deg, #eef1f7 25%, #f6f8fc 37%, #eef1f7 63%);
  background-size: 400% 100%;
  animation: sk-shimmer 1.3s ease infinite;
}
@keyframes sk-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* 首页两个快捷入口的图标占位（原站是真实图片） */
.art-ph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}
.art-add { background: linear-gradient(140deg, #6366f1, #4338ca); }
.art-copy { background: linear-gradient(140deg, #0ea5e9, #0369a1); }

/* Toast：叠在底部 tabbar 之上，不挡按钮 */
.toast-stack {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + 22px);
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 32px);
}
.toast {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .93);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow);
  animation: toast-in .2s ease;
  text-align: center;
}
.toast.out { animation: toast-out .24s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }

/* 卡片内的下载按钮：小一号但仍可点 */
.app-card-actions .btn { min-height: 34px; }

/* 公告正文排版 */
#noticeBody p {
  margin: 0 0 8px;
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}
#noticeBody p:last-child { margin-bottom: 0; }

/* 详情页：facts + 段落（沿用 iosd 的结构类名） */
.facts dd.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  font-weight: 500;
}
.prose .kv {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 4px 10px;
  font-size: 13px;
}
.prose .kv dt { color: var(--muted); }
.prose .kv dd { margin: 0; word-break: break-all; }

/* 移动端搜索框：避免 iOS 聚焦缩放 */
@supports (-webkit-touch-callout: none) {
  .searchbar input { font-size: 16px; }
}
