.spec-scene-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border-radius: 8px;
  background: #fff;
}
.spec-scene-svg {
  display: block;
  width: 100%;
  min-width: 1050px;
  height: auto;
  max-width: none;
}
.spec-scene-svg .spec-scene-token,
.spec-scene-svg .spec-scene-phase { transition: opacity .16s ease; }
@media (prefers-reduced-motion: reduce) {
  .spec-scene-svg * { animation: none !important; transition: none !important; }
}

.spec-scene-adaptive {
  padding: 12px;
  border: 1px solid #d4dfeb;
  border-radius: 8px;
  color: #263b51;
  font-size: 14px;
  line-height: 1.45;
}
.spec-scene-adaptive h5 { margin: 0; font-size: 14px; color: #203b58; }
.spec-lab .spec-scene-adaptive p { margin: 3px 0 0; font-size: 12px; line-height: 1.45; color: #475e73; }
.spec-web-chain {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0e8f0;
}
.spec-web-chain > div:first-child { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.spec-lab .spec-web-chain p { margin-top: 0; }
.spec-web-token-chain,
.spec-web-tokens {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.spec-web-token-chain { gap: 14px; }
.spec-web-token {
  position: relative;
  padding: 4px 2px;
  border: 1px solid;
  border-radius: 5px;
  font-weight: 650;
  text-align: center;
}
.spec-web-token small,
.spec-web-query small { margin-left: 3px; font-size: 12px; font-weight: 400; }
.spec-web-token.is-current { outline: 2px solid #527fc3; outline-offset: 1px; }
.spec-web-anchor { background: #e9f0ff; border-color: #789ada; color: #214b96; }
.spec-web-draft { background: #fff4dc; border-color: #caa355; color: #805a17; }
.spec-web-valid { background: #e7f5ef; border-color: #77af98; color: #195f49; }
.spec-web-future { background: #f6f8fb; border-color: #bcc8d6; color: #516577; }
.spec-web-token-chain > .spec-web-token + .spec-web-token::before {
  content: '›';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 17px;
  color: #8c7446;
}
.spec-web-comparison {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 10px;
}
.spec-web-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 8px;
  margin-bottom: 4px;
}
.spec-web-card-head > span { font-size: 12px; color: #475e73; }
.spec-scene-adaptive .is-active h5,
.spec-scene-adaptive .is-active .spec-web-card-head > span { color: #214b96; }
.spec-web-query {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  font-size: 13px;
}
.spec-web-query th,
.spec-web-query td {
  padding: 4px 6px;
  border-bottom: 1px solid #e1e8ef;
  font-size: inherit;
  line-height: 1.45;
  text-align: left;
  vertical-align: middle;
}
.spec-web-query thead th { color: #475e73; background: #f5f8fb; font-weight: 600; }
.spec-web-query tbody th { color: #263b51; white-space: nowrap; }
.spec-web-query .spec-web-row-valid { background: #f0f9f5; color: #195f49; }
.spec-web-query .spec-web-row-invalid { background: #fff5f2; color: #9c4136; }
.spec-web-results { display: grid; grid-template-rows: 1fr 1fr; gap: 6px; }
.spec-web-commit,
.spec-web-next {
  padding: 5px 8px;
  background: #f6f9fc;
  border: 1px solid #e0e8f0;
  border-radius: 6px;
}
.spec-web-results .is-active { border-color: #91acd8; }
@container (max-width: 490px) {
  .spec-web-chain,
  .spec-web-comparison { grid-template-columns: minmax(0, 1fr); }
  .spec-web-token-chain .spec-web-future small { display: block; margin-left: 0; }
  .spec-web-query th,
  .spec-web-query td { padding-inline: 4px; }
}
@container (max-width: 290px) {
  .spec-web-query { table-layout: fixed; }
  .spec-web-query thead th:first-child { width: 27%; }
  .spec-web-query thead th:nth-child(2) { width: 31%; }
  .spec-web-query tbody th { white-space: normal; }
  .spec-web-query small { display: inline-block; }
}
