/* ===== 玻璃拟态通用基底（decision-matrix / short-url-unwrap 共用） ===== */

/* 全屏彩色背景：浅色用柔和马卡龙渐变，深色用深邃霓虹渐变，两者都给毛玻璃提供底色 */
.gm-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(820px 520px at 12% 8%,  #bcd0ff 0%, transparent 60%),
    radial-gradient(720px 520px at 88% 14%, #ffd1e8 0%, transparent 60%),
    radial-gradient(820px 600px at 50% 102%,#c8f1ff 0%, transparent 60%),
    linear-gradient(160deg, #eaf0ff 0%, #f6efff 100%);
}
.gm-bg::before,
.gm-bg::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .5;
  animation: gmFloat 18s ease-in-out infinite;
}
.gm-bg::before {
  width: 440px; height: 440px; left: 4%; top: 18%;
  background: radial-gradient(circle at 30% 30%, #8aa6ff, transparent 70%);
}
.gm-bg::after {
  width: 400px; height: 400px; right: 6%; bottom: 10%;
  background: radial-gradient(circle at 30% 30%, #ff8ac4, transparent 70%);
  animation-delay: -8s;
}
@keyframes gmFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(34px, -28px) scale(1.08); }
}

html[data-theme="dark"] .gm-bg {
  background:
    radial-gradient(900px 600px at 12% 8%,  #5b3df5 0%, transparent 55%),
    radial-gradient(820px 600px at 88% 14%, #00b3ff 0%, transparent 55%),
    radial-gradient(900px 700px at 50% 102%,#ff3f95 0%, transparent 55%),
    linear-gradient(160deg, #141233 0%, #0b1024 100%);
}
html[data-theme="dark"] .gm-bg::before { background: radial-gradient(circle at 30% 30%, #6d5dfc, transparent 70%); }
html[data-theme="dark"] .gm-bg::after  { background: radial-gradient(circle at 30% 30%, #ff4f9a, transparent 70%); }

.gm-page { position: relative; z-index: 0; }

/* 顶部标题区 */
.gm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 4px 0 22px; }
.gm-title {
  font-size: 27px; font-weight: 800; margin: 0; letter-spacing: -.4px;
  background: linear-gradient(135deg, var(--c-primary), #ff5fa2);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
html[data-theme="dark"] .gm-title { background: linear-gradient(135deg, #9db4ff, #ff8ac4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gm-sub { font-size: 13px; color: var(--c-text-sub); margin: 6px 0 0; }
.gm-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.gm-chip {
  border: 1px solid rgba(31, 45, 90, .14);
  background: rgba(255, 255, 255, .55);
  color: var(--c-text);
  padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.gm-chip:hover { border-color: var(--c-primary); }
.gm-chip.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
html[data-theme="dark"] .gm-chip { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); }
html[data-theme="dark"] .gm-chip.active { color: #fff; }

/* 玻璃面板 */
.glass {
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(255, 255, 255, .65);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(31, 45, 90, .12);
}
html[data-theme="dark"] .glass {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .14);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .38);
}
.gm-card { padding: 20px; margin-bottom: 18px; }
.gm-card > h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; margin: 0 0 14px; color: var(--c-text); }
.gm-tip { margin-top: 12px; font-size: 12.5px; color: var(--c-text-muted); }

/* 双栏布局 */
.gm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.gm-grid > .glass { margin-bottom: 0; }
.gm-grid + .glass { margin-top: 18px; }

/* 输入控件 */
.gm-input, .gm-select, .gm-textarea {
  width: 100%; padding: 10px 13px; border-radius: 11px;
  border: 1px solid rgba(31, 45, 90, .14);
  background: rgba(255, 255, 255, .6);
  color: var(--c-text); font-size: 14px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.gm-textarea { resize: vertical; font-family: inherit; line-height: 1.6; }
.gm-input:focus, .gm-select:focus, .gm-textarea:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-primary) 22%, transparent);
}
html[data-theme="dark"] .gm-input,
html[data-theme="dark"] .gm-select,
html[data-theme="dark"] .gm-textarea {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .16);
}

/* 行式条目（选项 / 维度） */
.gm-opt-row, .gm-crit-row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.gm-crit-row .gm-crit-name { flex: 1; min-width: 0; }
.gm-crit-row .gm-crit-weight { width: 76px; flex-shrink: 0; }
.gm-del {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid rgba(31, 45, 90, .12); background: rgba(255, 255, 255, .5);
  color: var(--c-text-muted); cursor: pointer; font-size: 14px; line-height: 1;
  transition: all .15s;
}
.gm-del:hover { color: #dc2626; border-color: #dc2626; background: rgba(239, 68, 68, .1); }
html[data-theme="dark"] .gm-del { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .16); }

.gm-add {
  margin-top: 4px; width: 100%; padding: 9px; border-radius: 11px;
  border: 1px dashed rgba(31, 45, 90, .25); background: transparent;
  color: var(--c-primary); font-weight: 600; font-size: 13.5px; cursor: pointer;
  transition: all .15s;
}
.gm-add:hover { background: color-mix(in srgb, var(--c-primary) 10%, transparent); border-style: solid; }
html[data-theme="dark"] .gm-add { border-color: rgba(255, 255, 255, .22); }

/* 信息区 */
.gm-info { display: flex; gap: 16px; align-items: flex-start; margin: 6px 0 20px; flex-wrap: wrap; }
.gm-icon {
  width: 58px; height: 58px; border-radius: 16px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 30px; color: #fff;
  background: linear-gradient(135deg, var(--c-primary), #ff5fa2);
  box-shadow: 0 10px 22px color-mix(in srgb, var(--c-primary) 35%, transparent);
}
html[data-theme="dark"] .gm-icon { background: linear-gradient(135deg, #6d5dfc, #ff4f9a); }
.gm-info-body { flex: 1; min-width: 240px; }
.gm-info-body h1 { font-size: 22px; margin: 0 0 8px; color: var(--c-text); }
.gm-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.gm-badge {
  font-size: 12px; padding: 4px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, .55); color: var(--c-text-sub);
  border: 1px solid rgba(31, 45, 90, .1);
}
html[data-theme="dark"] .gm-badge { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); color: var(--c-text-sub); }
.gm-desc { font-size: 14px; line-height: 1.75; color: var(--c-text-sub); margin: 0 0 12px; }
.gm-meta { display: flex; flex-wrap: wrap; gap: 10px; }
.gm-meta .item { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.gm-meta .k { color: var(--c-text-muted); }
.gm-meta .v { color: var(--c-text); font-weight: 600; }

/* Tab 区 */
.gm-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 16px; }
.gm-tab {
  border: none; background: rgba(255, 255, 255, .5); color: var(--c-text-sub);
  padding: 9px 16px; border-radius: 11px; font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: all .15s;
}
.gm-tab:hover { color: var(--c-primary); }
.gm-tab.active { background: var(--c-primary); color: #fff; }
html[data-theme="dark"] .gm-tab { background: rgba(255, 255, 255, .08); }
.gm-panel { display: none; }
.gm-panel.active { display: block; animation: gmFade .25s ease; }
@keyframes gmFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.gm-block-head { font-size: 16px; margin: 4px 0 12px; color: var(--c-text); }
.gm-block-head:not(:first-child) { margin-top: 22px; }
.gm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gm-chip-line {
  display: flex; align-items: center; gap: 7px; font-size: 13px;
  padding: 7px 13px; border-radius: 10px; color: var(--c-text-sub);
  background: rgba(255, 255, 255, .5); border: 1px solid rgba(31, 45, 90, .1);
}
html[data-theme="dark"] .gm-chip-line { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .14); }
.gm-chip-line .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c-primary); flex-shrink: 0; }

.gm-steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.gm-steps li { display: flex; gap: 12px; }
.gm-step-n {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--c-primary), #ff5fa2);
}
.gm-step-t { font-size: 13.5px; color: var(--c-text-sub); line-height: 1.6; }
.gm-step-t b { color: var(--c-text); }

.gm-changelog { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.gm-changelog li { display: flex; gap: 10px; font-size: 13px; color: var(--c-text-sub); line-height: 1.65; }
.gm-changelog .ver { color: #fff; background: var(--c-primary); font-weight: 700; padding: 2px 9px; border-radius: 7px; font-size: 12px; height: fit-content; flex-shrink: 0; }
.gm-changelog .date { color: var(--c-text-muted); flex-shrink: 0; }

/* 通用按钮（在玻璃页内） */
.gm-btn {
  border: none; border-radius: 11px; padding: 11px 18px; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all .15s; background: var(--c-primary); color: #fff;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--c-primary) 35%, transparent);
}
.gm-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.gm-btn.ghost { background: rgba(255, 255, 255, .55); color: var(--c-text); box-shadow: none; border: 1px solid rgba(31, 45, 90, .14); }
html[data-theme="dark"] .gm-btn.ghost { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); }
.gm-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* 面包屑在玻璃页里的底色 */
.gm-page .detail-breadcrumb a,
.gm-page .detail-breadcrumb .current { background: rgba(255, 255, 255, .5); }
html[data-theme="dark"] .gm-page .detail-breadcrumb a,
html[data-theme="dark"] .gm-page .detail-breadcrumb .current { background: rgba(255, 255, 255, .1); }

/* 移动端 */
@media (max-width: 768px) {
  .gm-grid { grid-template-columns: 1fr; }
  .gm-title { font-size: 22px; }
  .gm-head { align-items: flex-start; }
}

/* 通用结论横幅（安全 / 注意 / 危险） */
.gm-verdict { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; margin-bottom: 16px; }
.gm-verdict .v-icon { font-size: 26px; flex-shrink: 0; }
.gm-verdict .v-text b { font-size: 15px; }
.gm-verdict .v-text p { margin: 3px 0 0; font-size: 13px; line-height: 1.55; }
.gm-verdict.safe { background: rgba(34, 197, 94, .14); border: 1px solid rgba(34, 197, 94, .4); }
.gm-verdict.safe .v-text b { color: #16a34a; }
.gm-verdict.caution { background: rgba(245, 158, 11, .16); border: 1px solid rgba(245, 158, 11, .45); }
.gm-verdict.caution .v-text b { color: #d97706; }
.gm-verdict.danger { background: rgba(239, 68, 68, .14); border: 1px solid rgba(239, 68, 68, .45); }
.gm-verdict.danger .v-text b { color: #dc2626; }

/* 通用比例条 / 仪表 */
.gm-meter { position: relative; height: 18px; border-radius: 999px; background: rgba(31, 45, 90, .1); overflow: hidden; margin: 14px 0 8px; }
html[data-theme="dark"] .gm-meter { background: rgba(255, 255, 255, .12); }
.gm-meter-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--c-primary), #ff5fa2); transition: width .35s ease; }
.gm-meter .gm-tick { position: absolute; top: -5px; width: 2px; height: 28px; background: rgba(31, 45, 90, .55); z-index: 2; }
html[data-theme="dark"] .gm-meter .gm-tick { background: rgba(255, 255, 255, .55); }
.gm-meter-legend { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--c-text-muted); }

/* 数据卡网格 */
.gm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin: 4px 0 6px; }
.gm-stat { padding: 12px 14px; border-radius: 13px; background: rgba(255, 255, 255, .5); border: 1px solid rgba(31, 45, 90, .1); }
html[data-theme="dark"] .gm-stat { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); }
.gm-stat .s-label { font-size: 12px; color: var(--c-text-muted); }
.gm-stat .s-value { font-size: 21px; font-weight: 800; color: var(--c-text); margin-top: 3px; }
.gm-stat .s-value small { font-size: 12px; font-weight: 600; color: var(--c-text-sub); }

/* 建议 / 明细列表 */
.gm-advice { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gm-advice li { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; color: var(--c-text-sub); line-height: 1.6; }
.gm-advice li .a-ico { flex-shrink: 0; }
.gm-table-wrap { overflow-x: auto; margin-top: 10px; }
.gm-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 360px; }
.gm-table th, .gm-table td { padding: 8px 11px; text-align: center; border-bottom: 1px solid rgba(31, 45, 90, .1); color: var(--c-text-sub); }
.gm-table th:first-child, .gm-table td:first-child { text-align: left; color: var(--c-text); font-weight: 600; }
.gm-table thead th { color: var(--c-text); background: rgba(255, 255, 255, .4); }
html[data-theme="dark"] .gm-table th, html[data-theme="dark"] .gm-table td { border-bottom-color: rgba(255, 255, 255, .12); }
html[data-theme="dark"] .gm-table thead th { background: rgba(255, 255, 255, .05); }

/* 两栏输入 */
.gm-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.gm-field label { display: block; font-size: 12.5px; color: var(--c-text-sub); margin-bottom: 6px; }
.gm-actions { margin-top: 6px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.gm-opt-line { font-size: 12.5px; color: var(--c-text-muted); margin-top: 8px; }
@media (max-width: 560px) { .gm-fields { grid-template-columns: 1fr; } }
