.glossary-astral, .glossary-astral ul, .glossary-astral li { min-width: 0; }
.glossary-astral h2 { margin: 28px 0 12px; }
.glossary-astral h2:first-child { margin-top: 0; }
.glossary-astral h2.astral-guide-intro-title { width: 100%; box-sizing: border-box; margin: 20px 0 18px; padding: 18px clamp(12px, 3vw, 24px); border: 1px solid #c0c7d0; background: #0b1018; text-align: center; }
.glossary-astral h3 { margin: 20px 0 8px; }
.glossary-astral ul { padding-left: 22px; line-height: 1.6; }
.glossary-astral li + li { margin-top: 8px; }
.astral-guide-number { font-family: Arial, sans-serif; font-variant-numeric: tabular-nums; }
.astral-guide-formula { display: block; width: fit-content; max-width: 100%; margin: 10px 0; padding: 10px 12px; border: 1px solid var(--accent); background: var(--accent-2); font: 700 clamp(12px, 2.5vw, 16px)/1.5 Arial, sans-serif; white-space: nowrap; overflow-x: auto; }
.astral-guide-inline-icon { vertical-align: middle; object-fit: contain; }
.astral-guide-attributes { margin: 12px 0; }
.astral-guide-attribute { display: inline-block; margin-right: 6px; padding: 2px 6px; border: 1px solid var(--attribute-color); font: 700 14px/1.4 Arial, sans-serif; }
.astral-guide-sg { display: inline-block; padding: 2px 6px; color: #ff8585; border: 1px solid #e25b63; font: 700 14px/1.4 Arial, sans-serif; }
.astral-guide-hp { color: #82d990; }
.astral-guide-gs { color: #69b5ff; }
.astral-guide-success { color: #82d990; }
.astral-guide-failure { color: #ff8585; }
.astral-guide-moons li { padding: 2px 0; }
.astral-guide-sphere-levels li { display: grid; grid-template-columns: 5.5em max-content; align-items: center; column-gap: 12px; }
.astral-guide-details { margin: 14px 0; padding: 0 12px; border: 1px solid var(--border); background: rgba(8, 12, 18, 0.3); }
.astral-guide-details summary { padding: 12px 0; cursor: pointer; font-weight: bold; }
.astral-guide-details summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.astral-guide-table-scroll { overflow-x: auto; }
.astral-guide-items { min-width: 480px; }
.astral-guide-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.astral-guide-advantage { display: flex; justify-content: center; align-items: center; gap: 20px; margin: 16px 0; }
.astral-guide-die { position: relative; display: grid; place-items: center; flex: 0 0 100px; width: 100px; height: 100px; --split-start: 60px; animation: astral-guide-dice-split 7s cubic-bezier(.22,.7,.25,1) infinite; }
.astral-guide-die:nth-child(2) { --split-start: -60px; }
.astral-guide-die img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: grayscale(1); }
.astral-guide-die .astral-guide-die-frame { filter: drop-shadow(0 0 3px #fff); opacity: .6; }
.astral-guide-die strong { position: relative; color: #fff; font: 700 28px/1 Arial, sans-serif; text-shadow: 0 2px 3px #000; }
/* Split in .84s, hold both dice for about five seconds, then reset. */
@keyframes astral-guide-dice-split {
  0% { transform: translateX(var(--split-start)); filter: brightness(1); opacity: 1; }
  2% { transform: translateX(var(--split-start)); filter: brightness(4) drop-shadow(0 0 22px #fff); }
  3.5% { transform: translateX(var(--split-start)); filter: brightness(2) drop-shadow(0 0 12px #fff); }
  12%, 84% { transform: translateX(0); filter: brightness(1); opacity: 1; }
  90% { transform: translateX(0); filter: brightness(1); opacity: 0; }
  91%, 94% { transform: translateX(var(--split-start)); filter: brightness(1); opacity: 0; }
  100% { transform: translateX(var(--split-start)); filter: brightness(1); opacity: 1; }
}
.astral-guide-karma { margin: 60px 0 24px; }
.astral-guide-karma-track { background: linear-gradient(to right, #ff7676, #54232b 40%, #fff 40% 60%, #204536 60%, #73df9d); }
.astral-guide-karma-tier { position: absolute; top: -48px; text-align: center; font: 700 clamp(11px, 2.5vw, 14px)/1.4 Arial, sans-serif; }
.astral-guide-karma-tier strong { display: inline-block; width: calc(100% - 2px); max-width: 32px; padding: 2px 0; border: 1px solid currentColor; }
.astral-guide-moon-pairs { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; margin: 30px 0; }
.astral-guide-moon-pairs .moon-band-bonus { flex: 0 0 220px; margin: 12px 0; }
@media (prefers-reduced-motion: reduce) {
  .astral-guide-die { animation: none; }
}
.astral-guide-formula.astral-guide-hp, .astral-guide-formula.astral-guide-gs { border-color: currentColor; }
.astral-guide-soul { width: min(360px, 100%); margin: 24px auto 30px; }
.astral-guide-item { display: flex; align-items: center; gap: 10px; }
.astral-guide-item img { flex-shrink: 0; object-fit: contain; }
.astral-guide-table { width: 100%; margin: 16px 0; border-collapse: collapse; font: 14px/1.5 Arial, sans-serif; font-variant-numeric: tabular-nums; }
.astral-guide-table caption { text-align: left; font-weight: bold; margin-bottom: 8px; }
.astral-guide-table th, .astral-guide-table td { text-align: left; padding: 8px 12px; border: 1px solid var(--border); }
.astral-guide-table thead { background: var(--accent-2); }
.astral-guide-table tbody tr:nth-child(even) { background: rgba(148, 168, 196, 0.06); }
.astral-guide-modifiers { max-width: 560px; }
.astral-guide-modifiers td, .astral-guide-ranks td { text-align: center; }
.glossary-astral .astral-guide-spheres { list-style: none; padding: 0; }
.glossary-astral .astral-guide-relentless { margin-top: 28px; }
.astral-guide-spheres li { display: flex; gap: 18px; align-items: center; padding: 12px; border: 1px solid var(--border); background: rgba(8, 12, 18, 0.4); }
.astral-guide-spheres p { margin: 4px 0 0; }
.astral-guide-sphere { flex: 0 0 68px; margin: 0; text-align: center; }
.astral-guide-art { display: block; position: relative; width: 68px; aspect-ratio: 768 / 886; }
.astral-guide-frame, .astral-guide-icon { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.astral-guide-icon { filter: brightness(0) saturate(100%) invert(76%); }
.astral-guide-rank { display: inline-block; min-width: 2.2em; padding: 2px 6px; text-align: center; border: 1px solid currentColor; line-height: 1.3; }
.astral-guide-rank[data-rank="D"] { color: #fff; }
.astral-guide-rank[data-rank="C"] { color: #b8e7ff; }
.astral-guide-rank[data-rank="B"] { color: #549af0; }
.astral-guide-rank[data-rank="A"] { color: #d46cf2; }
.astral-guide-rank[data-rank="S"] { color: #ef6970; }
.astral-guide-rank[data-rank="S+"] { color: #ff253e; border-width: 2px; box-shadow: 0 0 8px #ff253e80; text-shadow: 0 0 6px #ff253e80; }
@media (max-width: 480px) {
  .astral-guide-spheres li { gap: 10px; padding: 8px; }
  .astral-guide-table th, .astral-guide-table td { padding: 8px; }
}
