.notation-pair, .notation-coding {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(6rem, .26fr) minmax(0, 1fr);
  gap: .55rem;
  align-items: center;
}
.notation-coding { grid-template-columns: minmax(0, .85fr) minmax(6rem, .25fr) minmax(0, 1.35fr); }
.notation-sheet, .notation-preview {
  min-width: 0;
  border: 2px solid var(--ink);
  border-radius: 11px 9px 12px 8px;
  padding: .55rem .65rem;
  background: var(--strategy-paper);
}
.notation-sheet h4, .notation-preview h4 {
  display: flex;
  align-items: center;
  gap: .35rem .55rem;
  flex-wrap: wrap;
  margin: 0 0 .35rem;
  padding: 0 0 .25rem;
  border-bottom: 1px solid var(--strategy-rule);
}
.notation-sheet h4 img, .notation-preview h4 img { width: 45px; height: 35px; object-fit: contain; }
.notation-sheet pre {
  margin: .15rem 0 .25rem;
  padding: .28rem 0;
  overflow: auto;
  font-size: .96em;
  line-height: 1.55;
  tab-size: 4;
}
.notation-sheet code, .notation-preview code { font-family: Consolas, "Yu Gothic UI", monospace; }
.notation-role-a, .notation-role-b, .notation-role-c { color: var(--ink); padding: 0 .13rem; }
.notation-role-a { background: #ffed9a; }
.notation-role-b { background: var(--strategy-cyan); }
.notation-role-c { background: var(--strategy-green); }
.notation-keys { display: flex; gap: .3rem .6rem; flex-wrap: wrap; font-size: .91em; }
.notation-preview > div { margin: .3rem 0; padding: .45rem; background: #fffefa; border-radius: .35rem; }
.notation-preview-heading { font-size: 1.35em; }
.notation-preview p { margin: .26rem 0; }
.notation-preview u { color: #174b84; }
.notation-arrow { display: grid; gap: .2rem; text-align: center; color: var(--strategy-teal); line-height: 1.3; }
.notation-arrow i { width: 100%; height: .85rem; }
.notation-test {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  margin: .5rem 0 0;
  padding: .3rem .55rem;
  border-block-start: 1px solid var(--strategy-rule);
}
.notation-test img { width: 47px; height: 35px; object-fit: contain; }
.notation-tree { display: grid; justify-items: center; gap: 1.35rem; text-align: center; }
.notation-tree > div:first-child, .notation-tree span[class] {
  border: 2px solid var(--ink);
  border-radius: 9px 11px 9px 7px;
  padding: .23rem .45rem;
}
.notation-tree > div:first-child { position: relative; }
.notation-tree > div:first-child::after, .notation-tree span[class]::before {
  content: "";
  width: 2px;
  height: .72rem;
  position: absolute;
  inset: 100% auto auto 50%;
  background: var(--ink);
}
.notation-tree > div:nth-child(2) { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.notation-tree > div:nth-child(2)::before {
  content: "";
  position: absolute;
  border-top: 2px solid var(--ink);
  left: calc(25% - .16rem);
  right: calc(25% - .16rem);
  top: -.7rem;
}
.notation-tree span[class] { position: relative; }
.notation-tree span[class]::before { inset: auto auto 100% 50%; }
.notation-tree b { font-family: Consolas, monospace; }
.notation-history { margin: .5rem 0 0; }
.notation-wire {
  display: grid;
  grid-template-columns: minmax(0, .75fr) minmax(5rem, .56fr) minmax(0, 1.55fr) minmax(5rem, .56fr) minmax(0, .75fr);
  gap: .55rem;
  align-items: center;
}
.notation-wire > div:not(.notation-arrow) { text-align: center; }
.notation-wire > div img { display: block; width: 93px; height: 71px; object-fit: contain; margin: 0 auto; }
.notation-wire > div span { display: block; }

@media (max-width: 720px) {
  .notation-pair, .notation-coding, .notation-wire { grid-template-columns: 1fr; }
  .notation-arrow i { justify-self: center; width: 1.8rem; rotate: 90deg; }
}
