.r8 [hidden] {display:none}
.r8 [data-workspace] {display:grid;gap:1rem}
.r8-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr));gap:.75rem}
.r8-grid label {display:grid;gap:.35rem;min-width:0}
.r8-card,.r8 details {padding:.85rem 1rem;border:1px solid color-mix(in srgb,currentColor 22%,transparent);border-radius:.8rem;background:color-mix(in srgb,currentColor 5%,transparent);min-width:0}
.r8 h2 {font-size:1rem;margin:0}
.r8-actions {display:flex;flex-wrap:wrap;align-items:center;gap:.65rem}
.r8 button,.r8 select {font:inherit;color:inherit;padding:.45rem .65rem;border:1px solid color-mix(in srgb,currentColor 35%,transparent);border-radius:.5rem;background:transparent}
.r8 select {width:100%}
.r8 option {background:Canvas;color:CanvasText}
.r8 button:not(:disabled),.r8 summary {cursor:pointer}
.r8 button:disabled {opacity:.45}
.r8 [data-roll],.r8 [data-accept] {background:#a91d36;color:#fff}
.r8 table {width:100%;border-collapse:collapse;margin-top:.75rem}
.r8 th,.r8 td {text-align:left;padding:.35rem;border-bottom:1px solid color-mix(in srgb,currentColor 15%,transparent)}
.r8 th:last-child,.r8 td:last-child {text-align:right;white-space:nowrap}
.r8-resource {display:flex;align-items:center;gap:.55rem}
.r8-resource img {flex:none;object-fit:contain}
.r8-cost-scroll {overflow-x:auto}
.r8-cost table {min-width:35rem}
.r8-cost input {width:8rem;max-width:100%;padding:.4rem;font:inherit;color:inherit;background:transparent;border:1px solid color-mix(in srgb,currentColor 35%,transparent);border-radius:.4rem}
.r8-cost-summary {display:flex;flex-wrap:wrap;gap:.5rem 2rem;margin:.8rem 0}
.r8-cost-summary p {margin:0}
.r8-cost-summary strong {display:block}
.r8-picker img,.r8-item-heading img {object-fit:contain;flex:none;border-radius:.4rem;background:#282027}
.r8-picker {min-width:0;margin:0;padding:.75rem;border:1px solid color-mix(in srgb,currentColor 22%,transparent);border-radius:.8rem}
.r8-picker legend {font-weight:700;padding:0 .35rem}
.r8-classes,.r8-items {display:grid;gap:.45rem}
.r8-classes {grid-template-columns:repeat(auto-fill,minmax(min(100%,5.15rem),1fr))}
.r8-items {grid-template-columns:repeat(auto-fit,minmax(min(100%,13rem),1fr))}
.r8-grades {display:flex;gap:.45rem;margin-bottom:.65rem}
.r8-picker button {min-width:0;display:flex;align-items:center;gap:.55rem;text-align:left}
.r8-picker button[aria-pressed=true] {border-color:#bf874e;background:color-mix(in srgb,#bf874e 22%,transparent)}
.r8-picker button:hover:not(:disabled) {border-color:#bf874e}
.r8-classes button {flex-direction:column;justify-content:start;text-align:center;font-size:.75rem;padding:.45rem .2rem;gap:.25rem;line-height:1.2}
.r8-classes img {width:1.9rem;height:1.9rem}
.r8-items button span {overflow-wrap:anywhere}
.r8-items small {display:block;opacity:.78;margin-top:.15rem}
.r8-bench {display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:1rem;padding:1rem;border-radius:.85rem;border:1px solid color-mix(in srgb,#b98243 48%,transparent);background:linear-gradient(110deg,color-mix(in srgb,#b98243 15%,transparent),transparent 75%)}
.r8-stage {position:relative;display:grid;place-items:center;flex:none;width:4.3rem;height:4.3rem}
.r8-stage:has(.r8-forge:not([hidden])) img {visibility:hidden}
.r8-forge {position:absolute;inset:0;display:grid;place-items:center;pointer-events:none;--r8-glow:#ff9a30a0;--r8-halo:#ef46165c}
[data-theme=light] .r8-forge {--r8-glow:#eb872a85;--r8-halo:#e35a1d30}
.r8-forge-status {display:block;min-height:1.25em}
.r8-orb {position:relative;display:block;width:2.6rem;aspect-ratio:1;border-radius:50%;background:radial-gradient(circle at 36% 35%,#fffbd8 8%,#ffca56 29%,#ff7526 55%,#9f210c 76%);box-shadow:0 0 1rem var(--r8-glow),0 0 1.8rem var(--r8-halo);animation:r8-fire .32s ease-in-out infinite alternate}
.r8-forge[data-mode=polish] .r8-orb {filter:hue-rotate(18deg)}
.r8-orb i {position:absolute;left:50%;top:42%;width:.35rem;height:.35rem;border-radius:50%;background:#ffd77a;box-shadow:0 0 .55rem #ff751e;animation:r8-ember .65s ease-out infinite;--drift:-1.8rem}
.r8-orb i:nth-child(2) {--drift:1.7rem;animation-delay:.18s}
.r8-orb i:nth-child(3) {--drift:.1rem;animation-delay:.34s}
@keyframes r8-fire {from {transform:scale(.9)} to {transform:scale(1.08);box-shadow:0 0 1.4rem var(--r8-glow),0 0 2.2rem var(--r8-halo)}}
@keyframes r8-ember {from {transform:translate(0,0);opacity:1} to {transform:translate(var(--drift),-2.6rem);opacity:0}}
@media(prefers-reduced-motion:reduce) {.r8-orb,.r8-orb i {animation:none}}
.r8-item-heading {display:flex;align-items:center;gap:.7rem}
.r8-item-heading img {padding:.25rem;border:1px solid #b98243}
.r8-item-heading span {font-size:.85rem}
.r8-card {background:linear-gradient(125deg, color-mix(in srgb,#ba7e42 13%,transparent),transparent 65%),color-mix(in srgb,currentColor 5%,transparent)}
.r8-card ul {display:grid;gap:.4rem;list-style:none;padding:0;margin:.5rem 0}
.r8-card li {padding:.45rem .65rem;border-radius:.4rem;background:color-mix(in srgb,currentColor 6%,transparent)}
.r8-card .r8-unique {
    color:#ffcc80;
    background:color-mix(in srgb,currentColor 12%,transparent);
    border-inline-start:3px solid currentColor;
    font-weight:600;
}
[data-theme=light] .r8-card .r8-unique {color:#824700}
.r8 [data-comparison] {border-color:#bb8546}
.r8 [data-roll] {box-shadow:0 .2rem .65rem #80162940}
.r8 [data-roll]:hover:not(:disabled) {background:#be2944}
