/* ============================================================
   第八轮：弹窗宽度统一成「卦辞弹窗」那种、神煞一行 7 个、
           展开全部按钮缩小
   ============================================================ */

@media (min-width: 901px) {
  /* ---------- 弹窗：以卦辞/爻辞那张为基准（居中、1240 上限、留白舒服） ---------- */
  .modal-card {
    width: min(1240px, calc(100vw - 120px)) !important;
    max-height: 86vh;
    border-radius: 14px;
  }
  .modal-head { padding: 20px 24px 16px; }
  .modal-head h2 { font-size: 21px; }
  .modal-sub { font-size: 12.5px; margin-top: 6px; }
  .modal-body { padding: 20px 24px; }
  .modal-foot { padding: 12px 24px 16px; }
  .modal-actions .btn { font-size: 14px; padding: 6px 16px; }

  /* 内容本身很窄的弹窗，别硬撑 1240 */
  #shotModal .modal-card,
  #inspModal .modal-card,
  #ioModal .modal-card,
  #csEditModal .modal-card { width: min(880px, calc(100vw - 160px)) !important; }
  #scopeModal .scope-card { width: min(880px, calc(100vw - 160px)) !important; }

  /* 截图弹窗里的按钮排布：两行、每行两块，更像图3的呼吸 */
  #shotModal .shot-choices { display: flex; gap: 12px; margin-bottom: 12px; }
  #shotModal .shot-choices .btn { flex: 1 1 0; padding: 10px 14px; font-size: 14px; }
  #shotModal .shot-actions { display: flex; gap: 12px; flex-wrap: wrap; }
  #shotModal .shot-actions .btn { flex: 1 1 0; padding: 10px 14px; font-size: 14px; }
  #shotModal .shot-tip { font-size: 13px; line-height: 1.7; }

  /* ---------- 神煞：默认一行 7 个 ---------- */
  #view-cast .ss-block:not(.ss-open) .ss-list .ss-item:nth-child(n + 8) { display: none !important; }
  #view-cast .ss-block:not(.ss-open) .ss-list {
    flex-wrap: nowrap !important;
    overflow: hidden;
    gap: 2px 20px !important;
  }
  #view-cast .ss-block.ss-open .ss-list {
    flex-wrap: wrap !important;
    overflow: visible;
  }

  /* 展开全部按钮收小一号，跟正文齐平 */
  #view-cast .ss-toggle {
    font-size: 12.5px !important;
    padding: 1px 9px !important;
    border: 1px solid var(--line-2);
    border-radius: 7px;
    line-height: 1.6;
    color: var(--ink-2);
  }
  #view-cast .ss-head { font-size: 13.5px; }
  #view-cast .ss-head em { font-size: 12px; }
}
