/* ============================================================
   单资源内容页 (/rom/<id>-<slug>) 专用样式
   复用 home.css 的暗色令牌 (--bg/--surface/--teal/--grad/--radius …),
   不重复定义主题变量 —— 改主题时这里自动跟随。
   ============================================================ */

/* ---------- 区块副标题 ---------- */
.dblock__hint {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ---------- 1. 信息卡片 ---------- */
.rcard {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: flex-start;
  justify-content: space-between;
  margin-top: 4px;
  padding: 24px 26px;
  border-radius: var(--radius);
  background:
    radial-gradient(120% 100% at 88% 6%, rgba(77, 225, 193, .10), transparent 58%),
    radial-gradient(120% 100% at 6% 96%, rgba(124, 92, 255, .12), transparent 58%),
    var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 10px 34px rgba(0, 0, 0, .34);
}
.rcard__main { flex: 1 1 520px; min-width: 0; }
.rcard__kicker {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--teal);
}
.rcard__name {
  margin: 0 0 10px;
  font-size: 25px;
  line-height: 1.28;
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
}
.rcard__sub {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 78ch;
}
.rcard__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rcard__stats li {
  flex: 0 0 auto;
  min-width: 92px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.rcard__stats b {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
}
.rcard__stats span {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--text-dim);
}
.rcard__act {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 260px;
}
.rcard__note {
  margin: 2px 0 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--text-dim);
}
.btn--lg { height: 44px; padding: 0 22px; font-size: 15px; }

/* ---------- 规格表 ---------- */
.spec {
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line);
}
.spec__row:nth-child(odd) { background: var(--surface-2); }
.spec__row:nth-child(even) { background: var(--surface); }
.spec__k,
.spec__v {
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.6;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.spec__k {
  width: 132px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.spec__v { color: var(--text); word-break: break-all; }
.spec__row:last-child .spec__k,
.spec__row:last-child .spec__v { border-bottom: none; }

/* ---------- 更新日志 ---------- */
.changelog {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-muted);
  max-height: 320px;
  overflow-y: auto;
}

/* ---------- 2. 上级级联 (模块列表) ---------- */
.casc {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: casc;
}
.casc__item {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.casc__item:first-child { border-top: none; }
.casc__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.casc__step {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--grad-soft);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--teal);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}
.casc__dim {
  flex: 0 0 auto;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text-dim);
  font-size: 11.5px;
}
.casc__val {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.casc__val:hover { color: var(--teal); }
.casc__cnt {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
}
.casc__cnt:hover { color: var(--teal); }
.casc__sib {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 9px 0 0 32px;
}
.casc__siblabel {
  font-size: 11.5px;
  color: var(--text-dim);
}
.casc__chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text-muted);
  font-size: 12px;
  text-decoration: none;
}
.casc__chip:hover {
  background: var(--surface-hover);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--teal);
}
.casc__chip em {
  font-style: normal;
  font-size: 11px;
  color: var(--text-dim);
}

/* ---------- 3. 各级联随机推荐 ---------- */
.rec {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.rec__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.rec__title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
}
.rec__title a { color: var(--teal); text-decoration: none; }
.rec__title a:hover { text-decoration: underline; }
.rec__more {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
}
.rec__more:hover { color: var(--teal); }
.rec__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rec__card { min-width: 0; }
.rec__link {
  display: block;
  height: 100%;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line);
  text-decoration: none;
  transition: background .15s, box-shadow .15s, transform .15s;
}
.rec__link:hover {
  background: var(--surface-hover);
  box-shadow: inset 0 0 0 1px var(--teal);
  transform: translateY(-2px);
}
.rec__model {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rec__ver {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--teal);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rec__meta {
  display: block;
  margin-top: 5px;
  font-size: 11.5px;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- FAQ ---------- */
.faq { margin-top: 14px; }
.faq__item {
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}
.faq__item[open] { box-shadow: inset 0 0 0 1px var(--line-strong); }
.faq__q {
  padding: 13px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::before {
  content: "+";
  display: inline-block;
  width: 16px;
  color: var(--teal);
  font-weight: 700;
}
.faq__item[open] .faq__q::before { content: "−"; }
.faq__q:hover { color: var(--teal); }
.faq__a {
  padding: 0 16px 14px 32px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-muted);
}

/* ---------- 窄屏 ---------- */
@media (max-width: 720px) {
  .rcard { padding: 18px 16px; }
  .rcard__name { font-size: 20px; }
  .rcard__act { max-width: none; width: 100%; }
  .casc__sib { margin-left: 0; }
  .rec__grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .spec__k { width: 96px; font-size: 12px; }
}
