.trait-lab { background: #102b35; border-color: #294b55; color: #effcf9; }
.lab-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lab-heading h2 { margin: 0; }
.lab-heading span { color: #a4ead0; font-size: .68rem; font-weight: 800; letter-spacing: .12em; }
.lab-stage { display: grid; grid-template-columns: minmax(112px,.8fr) minmax(0,1.2fr); gap: 12px; margin: 16px 0; }
.lab-unit { display: grid; justify-items: center; align-content: center; gap: 6px; padding: 12px 6px; border-radius: 12px; border: 1px solid #60848d; background: radial-gradient(ellipse at top,#315866,#1b3944 74%); color: #f1fffb; font: inherit; text-align: center; }
.lab-unit:hover { border-color: #a4ead0; }
.lab-unit-frame { display: grid; place-items: center; position: relative; width: min(100%, 96px); aspect-ratio: 1; border: 1px solid #72a49c; border-radius: 11px; overflow: hidden; color: #a4ead0; font-size: 2.4rem; background: #203e48; }
.lab-unit-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lab-unit strong { font-size: .84rem; line-height: 1.25; overflow-wrap: anywhere; }
.lab-unit small { color: #b5e6d8; }
.trait-lab .roll-result { margin: 0; display: grid; align-content: center; gap: 10px; padding: 14px; color: #edf8f8; background: radial-gradient(ellipse at 20% 0%,#365873,#1a3744 67%); border: 1px solid #57778b; }
.trait-lab .roll-result.roll-rare { background: radial-gradient(ellipse at 25% 0%, #695395,#312748 70%); border-color: #bb9df2; }
.trait-lab .roll-result.roll-target { background: radial-gradient(ellipse at 25% 0%,#765824,#3c2e22 76%); border-color: #ffd783; }
.trait-lab .roll-die { width: 38px; height: 38px; background: #4d778c; color: #ecfffa; font-size: 26px; }
.trait-lab .roll-rare .roll-die { background: #765aa0; }
.trait-lab .roll-target .roll-die { background: #d8a555; color: #251a14; }
.trait-lab #roll-kicker, .trait-lab .roll-result small { color: #d6e6f0; }
.trait-lab .roll-result strong { margin: 3px 0 5px; line-height: 1.1; }
.trait-lab .tool-metrics div { background: #244550; }
.trait-lab .tool-metrics span, .trait-lab .text-button, .trait-lab .tool-details ol { color: #c2dfdf; }
.tools-main .trait-lab .primary-button { background: #b6f1d4; border-color: #b6f1d4; color: #12352d; }
.tools-main .trait-lab .primary-button:hover { background: #d6fbea; }
.tools-main .trait-lab .secondary-button { border-color: #83a8ad; color: #edfffa; background: #244550; }
.tools-main .trait-lab .secondary-button:hover { background: #315964; }
.lab-status { margin: 10px 0; color: #d7e9e8; min-height: 1.25em; font-size: .82rem; }
#unit-search { display: block; width: 100%; padding: 10px; margin: 6px 0 12px; font: inherit; }
.unit-choice { display: flex; align-items: center; gap: 10px; text-align: left; padding: 5px; }
.unit-choice img { border-radius: 5px; object-fit: cover; }
@keyframes trait-reveal { from { transform: scale(.78); opacity: .55; } to { transform: scale(1); opacity: 1; } }
@media(prefers-reduced-motion: no-preference) { .roll-result.reveal .roll-die { animation: trait-reveal .16s ease-out; } }
