/* Fallout 76 build service (/services/fo76). Panels follow the site's navy cards; amber accent for Vault-Tec. */
.fo76 {
    --fo76-accent: #8ecbff;
    --fo76-accent-strong: #b9dfff;
    --fo76-accent-ink: #07111f;
    --fo76-line: rgba(113, 163, 230, 0.28);
    --fo76-line-soft: rgba(113, 163, 230, 0.16);
    --fo76-text: #e7eefb;
    --fo76-muted: #9fb2d1;
    --fo76-bad: #ff7a7a;
    --fo76-ok: #6fdc9b;
    --fo76-ghoul: #9bd36a;
    display: flex;
    flex-direction: column;
    gap: var(--layout-gap);
    width: 100%;
    padding: 0 0 96px;
    color: var(--fo76-text);
}

.fo76-panel {
    background: linear-gradient(180deg, rgba(22, 33, 61, 0.82) 0%, rgba(16, 24, 46, 0.78) 100%);
    border: 1px solid var(--fo76-line);
    box-shadow: 0 16px 36px rgba(4, 10, 22, 0.34), inset 0 1px 0 rgba(188, 220, 255, 0.08);
    padding: 28px;
    min-width: 0;
}

.fo76-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.fo76-title {
    margin: 0 0 6px;
    font-size: 1.35rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.fo76-subtitle {
    margin: 0 0 12px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fo76-panel__head .fo76-subtitle {
    margin: 0;
}

.fo76-minor {
    margin: 16px 0 8px;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--fo76-muted);
}

.fo76-minor--bad {
    color: var(--fo76-bad);
}

.fo76-hint,
.fo76-note {
    color: var(--fo76-muted);
    margin: 0;
    line-height: 1.5;
}

.fo76-note {
    font-size: 0.85rem;
    margin-top: 10px;
}

.fo76-description {
    margin: 12px 0 0;
    white-space: pre-line;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.fo76-crumbs a {
    color: var(--fo76-muted);
    text-decoration: none;
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.fo76-crumbs a:hover {
    color: var(--fo76-text);
}

/* ---------- hero ---------- */
.fo76-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.fo76-hero__intro {
    max-width: 720px;
}

.fo76-hero__actions,
.fo76-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ---------- buttons, inputs ---------- */
.fo76-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 16px;
    border: 1px solid var(--fo76-line);
    background: rgba(40, 60, 100, 0.45);
    color: var(--fo76-text);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.fo76-btn:hover:not(:disabled) {
    background: rgba(60, 88, 140, 0.6);
    border-color: rgba(150, 190, 245, 0.5);
}

.fo76-btn:active:not(:disabled) {
    transform: translateY(1px);
}

.fo76-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.fo76-btn--primary {
    background: rgba(30, 51, 89, 0.88);
    border-color: rgba(100, 181, 246, 0.45);
    color: #8ecbff;
}

.fo76-btn--primary:hover:not(:disabled) {
    background: rgba(38, 66, 112, 0.95);
    border-color: rgba(142, 203, 255, 0.7);
    color: #d6ecff;
}

.fo76-btn--ghost {
    background: transparent;
}

.fo76-btn--danger {
    color: var(--fo76-bad);
}

.fo76-btn--block {
    width: 100%;
}

.fo76-btn:focus-visible,
.fo76-tab:focus-visible,
.fo76-input:focus-visible,
.fo76-avail__card:focus-visible,
.fo76-icon-btn:focus-visible,
.fo76-stepper__btn:focus-visible {
    outline: 2px solid var(--fo76-accent);
    outline-offset: 2px;
}

.fo76-input {
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--fo76-line);
    background: rgba(8, 14, 28, 0.6);
    color: var(--fo76-text);
    font: inherit;
    min-width: 0;
}

.fo76-input--num {
    width: 110px;
}

.fo76-textarea {
    resize: vertical;
    min-height: 72px;
}

.fo76-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    line-height: 1.4;
    margin: 6px 0;
}

.fo76-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--fo76-accent);
    flex: 0 0 auto;
    margin-top: 1px;
}

.fo76-check--compact {
    margin: 0;
    align-items: center;
    font-size: 0.8rem;
    color: var(--fo76-muted);
    gap: 6px;
}

.fo76-icon-btn {
    width: 34px;
    height: 34px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--fo76-muted);
    cursor: pointer;
    flex: 0 0 auto;
}

.fo76-icon-btn:hover {
    color: var(--fo76-bad);
    border-color: var(--fo76-line-soft);
}

/* ---------- tabs & toolbar ---------- */
.fo76-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.fo76-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.fo76-tab {
    min-height: 38px;
    padding: 6px 14px;
    border: 1px solid var(--fo76-line);
    background: transparent;
    color: var(--fo76-muted);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    position: relative;
}

.fo76-tab.is-active {
    background: rgba(30, 51, 89, 0.88);
    border-color: rgba(100, 181, 246, 0.6);
    color: #8ecbff;
}

.fo76-tab.is-bad:not(.is-active) {
    border-color: var(--fo76-bad);
    color: var(--fo76-bad);
}

.fo76-tab sup {
    margin-left: 4px;
    font-size: 0.7rem;
}

.fo76-tabs--special .fo76-tab {
    min-width: 46px;
}

.fo76-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.fo76-filters input[type=search] {
    width: 220px;
}

/* ---------- build cards (list) ---------- */
.fo76-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.fo76-grid > .fo76-hint {
    grid-column: 1 / -1;
}

.fo76-build-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--fo76-line-soft);
    background: rgba(10, 18, 36, 0.55);
    min-width: 0;
}

.fo76-build-card.is-selected {
    border-color: var(--fo76-accent);
    box-shadow: 0 0 0 1px var(--fo76-accent) inset;
}

.fo76-build-card__head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
}

.fo76-build-card__title {
    color: var(--fo76-text);
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.fo76-build-card__title:hover {
    color: var(--fo76-accent-strong);
}

.fo76-build-card__meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.fo76-build-card__author {
    color: var(--fo76-muted);
    font-size: 0.85rem;
}

.fo76-build-card__cards,
.fo76-build-card__leg {
    margin: 0;
    color: var(--fo76-muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

.fo76-build-card__leg {
    color: var(--fo76-accent);
}

.fo76-build-card__foot {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    color: var(--fo76-muted);
    font-size: 0.8rem;
}

.fo76-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(113, 163, 230, 0.16);
    color: #cfe0ff;
}

.fo76-badge--ghoul {
    background: rgba(155, 211, 106, 0.16);
    color: var(--fo76-ghoul);
}

.fo76-badge--muted {
    background: rgba(255, 255, 255, 0.08);
    color: var(--fo76-muted);
}

.fo76-special-strip {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.fo76-special-strip__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 0;
    background: rgba(243, 182, 63, 0.08);
    font-size: 0.85rem;
}

.fo76-special-strip__item b {
    color: var(--fo76-accent);
    font-size: 0.72rem;
}

.fo76-pager {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin-top: 16px;
}

.fo76-pager:empty {
    display: none;
}

/* ---------- export bar ---------- */
.fo76-exportbar {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    width: max-content;
    max-width: calc(100% - 32px);
    padding: 12px 16px;
    border: 1px solid var(--fo76-accent);
    background: rgba(14, 22, 42, 0.96);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.fo76-exportbar[hidden] {
    display: none;
}

.fo76-exportbar .fo76-check {
    margin: 0;
    font-size: 0.88rem;
}

/* ---------- mod section ---------- */
.fo76-mod__cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.fo76-mod__cols > div {
    min-width: 0;
    padding: 18px;
    border: 1px solid rgba(113, 163, 230, 0.2);
    background: rgba(10, 18, 36, 0.45);
}

.fo76-mod__cols > div > p:first-child {
    margin-top: 0;
}

.fo76-mod p {
    line-height: 1.55;
}

.fo76-list,
.fo76-steps {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    color: var(--fo76-muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.fo76-list li,
.fo76-steps li {
    position: relative;
    padding: 10px 0 10px 34px;
    border-top: 1px solid rgba(113, 163, 230, 0.14);
}

.fo76-list li:first-child,
.fo76-steps li:first-child {
    border-top: 0;
}

.fo76-list li::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 8px;
    width: 9px;
    height: 9px;
    border: 1px solid rgba(142, 203, 255, 0.7);
    background: rgba(142, 203, 255, 0.25);
}

.fo76-steps {
    margin-top: 0;
    counter-reset: fo76-step;
}

.fo76-steps li {
    counter-increment: fo76-step;
}

.fo76-steps li::before {
    content: counter(fo76-step);
    position: absolute;
    top: 9px;
    left: 0;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(100, 181, 246, 0.45);
    background: rgba(30, 51, 89, 0.88);
    color: #8ecbff;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
}

.fo76-mod .fo76-note {
    margin: 12px 0 0;
}

.fo76-mod .fo76-btn--primary {
    margin-top: 12px;
}

.fo76-grid.is-updating {
    opacity: 0.6;
    transition: opacity 0.15s ease;
}

.fo76-tab:focus:not(:focus-visible) {
    outline: none;
}

.fo76-filters .recruiting-select-wrap {
    min-width: 170px;
}

.fo76-code {
    display: block;
    margin-top: 6px;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.35);
    font-family: ui-monospace, Consolas, monospace;
    font-size: 0.85rem;
    overflow-x: auto;
}

/* ---------- build page layout ---------- */
.fo76-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
    align-items: start;
}

.fo76-layout__main,
.fo76-layout__side {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.fo76-sticky {
    position: sticky;
    top: calc(var(--site-header-height, 74px) + 12px);
}

.fo76-side-block .fo76-actions {
    margin-top: 12px;
}

.fo76-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: var(--fo76-accent);
    color: var(--fo76-accent-ink);
    font-weight: 800;
    flex: 0 0 auto;
}

.fo76-special-view {
    padding: 12px 0;
    border-top: 1px solid var(--fo76-line-soft);
}

.fo76-special-view:first-of-type {
    border-top: 0;
}

.fo76-special-view__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.fo76-special-view__name {
    font-weight: 600;
}

.fo76-special-view__value {
    font-size: 1.15rem;
    color: var(--fo76-accent-strong);
}

.fo76-special-view__pts {
    margin-left: auto;
    color: var(--fo76-muted);
    font-size: 0.85rem;
}

.fo76-card-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 12px;
    padding: 8px 10px;
    background: rgba(10, 18, 36, 0.45);
    margin-top: 6px;
}

.fo76-card-row__main {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.fo76-card-row__name {
    font-weight: 600;
}

.fo76-card-row__desc {
    grid-column: 1 / 2;
    color: var(--fo76-muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

.fo76-card-row > .fo76-cost {
    grid-row: 1 / span 2;
    grid-column: 2;
    align-self: center;
}

.fo76-cost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    border: 2px solid var(--fo76-accent);
    color: var(--fo76-accent-strong);
    font-weight: 800;
}

.fo76-cost--sm {
    min-width: 0;
    height: auto;
    border-width: 1px;
    font-size: 0.75rem;
    padding: 1px 6px;
}

.fo76-stars {
    display: inline-flex;
    gap: 3px;
}

.fo76-stars i {
    width: 14px;
    height: 14px;
    clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    background: rgba(255, 255, 255, 0.18);
}

.fo76-stars i.is-on {
    background: var(--fo76-accent);
}

/* ---------- editor ---------- */
.fo76-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 14px 16px;
    align-items: end;
}

.fo76-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--fo76-muted);
}

.fo76-field .fo76-input {
    color: var(--fo76-text);
    font-size: 1rem;
}

.fo76-field--wide {
    grid-column: 1 / -1;
}

.fo76-form > .fo76-field:first-child {
    grid-column: 1 / 2;
}

.fo76-seg {
    display: inline-flex;
    border: 1px solid var(--fo76-line);
    overflow: hidden;
}

.fo76-seg__btn {
    min-height: 40px;
    padding: 6px 14px;
    border: 0;
    background: transparent;
    color: var(--fo76-muted);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.fo76-seg__btn.is-active {
    background: var(--fo76-accent);
    color: var(--fo76-accent-ink);
}

.fo76-counter {
    font-weight: 700;
    color: var(--fo76-accent-strong);
}

.fo76-counter.is-bad,
.fo76-special-row__pts.is-bad {
    color: var(--fo76-bad);
}

.fo76-special-edit {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fo76-special-row {
    display: grid;
    grid-template-columns: minmax(140px, 1.1fr) auto minmax(80px, 1.4fr) 56px;
    align-items: center;
    gap: 12px;
    padding: 4px 6px;
}

.fo76-special-row.is-active {
    background: rgba(243, 182, 63, 0.08);
}

.fo76-special-row__label {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    background: transparent;
    color: var(--fo76-text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    padding: 4px 0;
    min-width: 0;
}

.fo76-special-row__pts {
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: var(--fo76-muted);
    font-size: 0.88rem;
}

.fo76-stepper {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.fo76-stepper__btn {
    width: 34px;
    height: 34px;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
    border: 1px solid var(--fo76-line);
    background: rgba(40, 60, 100, 0.35);
    color: var(--fo76-text);
    cursor: pointer;
}

.fo76-stepper__btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.fo76-stepper__value {
    min-width: 26px;
    text-align: center;
    font-size: 1.1rem;
    font-variant-numeric: tabular-nums;
}

.fo76-stepper--sm .fo76-stepper__btn {
    width: 28px;
    height: 28px;
}

.fo76-meter {
    position: relative;
    height: 10px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.fo76-meter__limit {
    position: absolute;
    inset: 0 auto 0 0;
    background: rgba(113, 163, 230, 0.25);
}

.fo76-meter__fill {
    position: absolute;
    inset: 0 auto 0 0;
    background: var(--fo76-accent);
}

.fo76-meter.is-bad .fo76-meter__fill {
    background: var(--fo76-bad);
}

.fo76-chosen {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fo76-chosen__row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    background: rgba(243, 182, 63, 0.07);
    border: 1px solid rgba(243, 182, 63, 0.25);
}

.fo76-chosen__row.is-bad {
    border-color: var(--fo76-bad);
}

.fo76-chosen__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 auto;
    min-width: 0;
}

.fo76-chosen__info .fo76-card-row__desc {
    font-size: 0.84rem;
}

.fo76-tag {
    font-size: 0.75rem;
    color: var(--fo76-ghoul);
}

.fo76-tag--bad {
    color: var(--fo76-bad);
}

.fo76-avail {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
    gap: 12px;
}

/* A perk card: portrait, cost in the corner, big SPECIAL letter, name, rank marks, effect. */
.fo76-avail__card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 268px;
    padding: 0;
    border: 1px solid rgba(113, 163, 230, 0.35);
    background: linear-gradient(180deg, rgba(26, 44, 78, 0.9) 0%, rgba(10, 18, 36, 0.92) 62%);
    color: var(--fo76-text);
    font: inherit;
    text-align: center;
    cursor: pointer;
    min-width: 0;
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.fo76-avail__card:hover:not(:disabled) {
    border-color: rgba(142, 203, 255, 0.75);
    transform: translateY(-2px);
}

.fo76-avail__card:disabled {
    cursor: default;
    opacity: 0.5;
}

.fo76-avail__card.is-locked {
    opacity: 0.55;
}

.fo76-avail__card.is-legendary {
    border-color: rgba(255, 217, 102, 0.5);
}

.fo76-avail__cost {
    position: absolute;
    top: 8px;
    left: 8px;
    min-width: 26px;
    padding: 2px 6px;
    border: 1px solid rgba(142, 203, 255, 0.55);
    background: rgba(7, 17, 31, 0.8);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
}

.fo76-avail__level {
    position: absolute;
    top: 10px;
    right: 8px;
    color: var(--fo76-muted);
    font-size: 0.72rem;
}

.fo76-avail__art {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 92px;
    color: rgba(142, 203, 255, 0.28);
    font-size: 3.6rem;
    font-weight: 800;
    line-height: 1;
}

.fo76-avail__card.is-legendary .fo76-avail__art {
    color: rgba(255, 217, 102, 0.35);
}

.fo76-avail__name {
    padding: 8px 10px 4px;
    border-top: 1px solid rgba(113, 163, 230, 0.25);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.fo76-avail__ranks {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding-bottom: 6px;
}

.fo76-avail__ranks i {
    width: 8px;
    height: 8px;
    border: 1px solid rgba(142, 203, 255, 0.7);
}

.fo76-avail__ranks i:first-child {
    background: #8ecbff;
}

.fo76-avail__desc {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    overflow: hidden;
    padding: 0 10px 10px;
    color: var(--fo76-muted);
    font-size: 0.76rem;
    line-height: 1.35;
}

.fo76-avail__card .fo76-tag {
    margin: 0 10px 8px;
}

.fo76-status {
    margin-bottom: 14px;
}

.fo76-issues {
    margin: 0;
    padding-left: 18px;
    color: var(--fo76-bad);
    font-size: 0.88rem;
    line-height: 1.45;
}

.fo76-issues li {
    margin-bottom: 4px;
}

.fo76-issues--warn {
    color: var(--fo76-muted);
}

.fo76-ok {
    color: var(--fo76-ok);
    margin: 0;
    font-weight: 600;
}

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
    .fo76-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .fo76-sticky {
        position: static;
    }

    .fo76-layout__side {
        order: -1;
    }
}

@media (max-width: 760px) {
    .fo76 {
        gap: 14px;
    }

    .fo76-panel {
        padding: 16px;
    }

    .fo76-mod__cols {
        grid-template-columns: 1fr;
    }

    .fo76-form {
        grid-template-columns: 1fr 1fr;
    }

    .fo76-form > .fo76-field:first-child {
        grid-column: 1 / -1;
    }

    .fo76-special-row {
        grid-template-columns: minmax(0, 1fr) auto 48px;
    }

    .fo76-special-row .fo76-meter {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .fo76-filters,
    .fo76-filters input[type=search] {
        width: 100%;
    }

    .fo76-filters select {
        flex: 1 1 0;
    }

    .fo76-chosen__row {
        flex-wrap: wrap;
    }

    .fo76-chosen__info {
        flex-basis: 100%;
    }

    .fo76-exportbar {
        bottom: 8px;
        gap: 8px;
    }
}

/* Site selects in the list toolbar: one row with the search field. */
.fo76-toolbar {
    align-items: center;
}

.fo76-tabs {
    align-items: flex-start;
}

.fo76-filters {
    align-items: center;
    justify-content: flex-end;
}

.fo76-filters .recruiting-select-wrap {
    flex: 0 0 180px;
    width: 180px;
    min-width: 0;
}

@media (max-width: 640px) {
    .fo76-filters .recruiting-select-wrap {
        flex: 1 1 100%;
        width: 100%;
    }
}

/* Editor: one column across the page, title and saving in the head. */
.fo76-layout--wide {
    grid-template-columns: minmax(0, 1fr);
}

.fo76-layout--wide .fo76-layout__main {
    gap: var(--layout-gap);
}

.fo76-editor-head__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.fo76-editor-head__intro {
    min-width: 0;
    flex: 1 1 320px;
}

.fo76-editor-head__intro .fo76-note {
    margin: 0;
}

.fo76-editor-head .fo76-status:not(:empty) {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(113, 163, 230, 0.2);
}

/* Perk cards / legendary perks: the section's two tabs. */
.fo76-tab--section {
    min-height: 42px;
    padding: 8px 18px;
    font-size: 1rem;
}

.fo76-section-body[hidden] {
    display: none;
}

/* Editor form: the switch and the save button in one row under the description. */
.fo76-form__foot {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.fo76-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.fo76-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.fo76-switch__track {
    position: relative;
    flex: none;
    width: 42px;
    height: 22px;
    border: 1px solid rgba(113, 163, 230, 0.4);
    background: rgba(8, 14, 28, 0.6);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.fo76-switch__track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    background: #9fb2d1;
    transition: transform 0.15s ease, background 0.15s ease;
}

.fo76-switch input:checked + .fo76-switch__track {
    border-color: rgba(100, 181, 246, 0.6);
    background: rgba(30, 51, 89, 0.88);
}

.fo76-switch input:checked + .fo76-switch__track::after {
    background: #8ecbff;
    transform: translateX(20px);
}

.fo76-switch input:focus-visible + .fo76-switch__track {
    outline: 2px solid var(--fo76-accent);
    outline-offset: 2px;
}

.fo76 .fo76-status:not(:empty) {
    margin-top: 14px;
}

/* List toolbar: search and filters of one height. */
.fo76-filters .fo76-input,
.fo76-filters .recruiting-select-trigger {
    box-sizing: border-box;
    height: 42px;
    min-height: 42px;
    padding-top: 0;
    padding-bottom: 0;
}

/* Build page: gear, comments, import. */
.fo76-gear {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
}

.fo76-gear-block__head {
    margin: 0 0 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
}

.fo76-gear-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.fo76-gear-list li {
    padding: 5px 0;
    border-bottom: 1px solid rgba(113, 163, 230, 0.14);
    color: var(--fo76-muted);
    overflow-wrap: anywhere;
}

.fo76-gear-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.fo76-mutations {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 6px 14px;
}

.fo76-import {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.fo76-import {
    flex-wrap: wrap;
    align-items: flex-end;
}

.fo76-import__field {
    display: flex;
    flex: 1 1 260px;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    font-size: 0.85rem;
}

.fo76-import .fo76-input {
    width: 100%;
    min-width: 0;
}

.fo76-comment-form {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 16px;
}

.fo76-comment-form .fo76-input {
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
}

.fo76-comment {
    padding: 10px 0;
    border-top: 1px solid rgba(113, 163, 230, 0.16);
}

.fo76-comment__head {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.fo76-comment__head time {
    font-size: 0.82rem;
    color: var(--fo76-muted);
}

.fo76-comment__head .fo76-icon-btn {
    margin-left: auto;
}

.fo76-comment__body {
    margin: 6px 0 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: var(--fo76-muted);
}

.fo76-btn.is-active {
    border-color: rgba(100, 181, 246, 0.8);
    color: #8ecbff;
}

/* Reset and save side by side. */
.fo76-form__save {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Links inside the mod instructions: the site's link colour. */
.fo76-steps a,
.fo76-list a,
.fo76-note a {
    color: #8ecbff;
    text-decoration: underline;
}

.fo76-steps a:hover,
.fo76-list a:hover,
.fo76-note a:hover {
    color: #fff;
}

/* Weapons and armor: the picker and the chosen items with an effect for each star. */
.fo76-select {
    appearance: none;
    -webkit-appearance: none;
    min-width: 0;
    padding-right: 28px;
    background-image: linear-gradient(45deg, transparent 50%, #8ecbff 50%), linear-gradient(135deg, #8ecbff 50%, transparent 50%);
    background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
    background-size: 5px 5px;
    background-repeat: no-repeat;
    text-overflow: ellipsis;
}

.fo76-select:focus,
.fo76-select:focus-visible {
    outline: none;
    box-shadow: none;
}

.fo76-select option {
    background: #0d1526;
    color: #e8eef8;
}

.fo76-gear-form .fo76-field > span {
    display: block;
    margin-bottom: 8px;
}

.fo76-gear-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto;
    gap: 8px;
    margin-bottom: 10px;
}

/* With a piece list the item takes the rest of the first row, and the piece sits next to the button. */
.fo76-gear-picker select:nth-child(2):not(:nth-last-child(2)) {
    grid-column: 2 / 4;
}

.fo76-gear-picker select:nth-child(3) {
    grid-column: 1 / 3;
}

.fo76-gear-rows {
    display: grid;
    gap: 8px;
}

.fo76-gear-row {
    padding: 10px 12px;
    border: 1px solid rgba(113, 163, 230, 0.22);
    background: rgba(255, 255, 255, 0.03);
}

.fo76-gear-row__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.fo76-gear-stars {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.fo76-gear-star {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
}

.fo76-gear-star > span,
.fo76-gear-effect i {
    color: #f3b63f;
    font-style: normal;
    letter-spacing: -1px;
}

.fo76-gear-effects {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin-top: 4px;
    font-size: 0.9rem;
}

@media (max-width: 720px) {
    .fo76-gear-stars {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Title and description side by side, one field for each language. */
.fo76-form__pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: end;
}

.fo76-form__pair--wide {
    grid-column: 1 / -1;
}

@media (max-width: 720px) {
    .fo76-form__pair {
        grid-template-columns: minmax(0, 1fr);
        grid-column: 1 / -1;
    }
}

/* Fields without a focus frame, and the level without spin arrows. */
.fo76-input:focus,
.fo76-input:focus-visible {
    outline: none;
    box-shadow: none;
}

.fo76-input--num {
    appearance: textfield;
    -moz-appearance: textfield;
}

.fo76-input--num::-webkit-outer-spin-button,
.fo76-input--num::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Build page: everything about the build in one head, perks in compact columns. */
.fo76-view {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.fo76-view-head {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.fo76-view-head__top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px 24px;
}

.fo76-view-head__info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.fo76-view-head .fo76-title,
.fo76-view-head .fo76-description {
    margin: 0;
}

.fo76-view-mod {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 22px;
    padding-top: 14px;
    border-top: 1px solid rgba(113, 163, 230, 0.16);
}

.fo76-view-mod__id {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.fo76-view-mod__code {
    margin-left: 6px;
    padding: 3px 8px;
    border: 1px solid rgba(113, 163, 230, 0.28);
    color: var(--fo76-muted);
    font-weight: 400;
}

.fo76-view-mod__code b {
    color: #8ecbff;
    letter-spacing: 0.04em;
}

.fo76-view-mod .fo76-actions {
    margin-left: auto;
}

.fo76-view-specials {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.fo76-view-special {
    border: 1px solid rgba(113, 163, 230, 0.16);
    background: rgba(255, 255, 255, 0.02);
}

.fo76-view-special__head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(113, 163, 230, 0.16);
}

.fo76-view-special__name {
    font-weight: 600;
}

.fo76-view-special__value {
    color: #8ecbff;
}

.fo76-view-special__pts {
    margin-left: auto;
    color: var(--fo76-muted);
    font-size: 0.82rem;
}

.fo76-view-special__pts.is-over {
    color: #ff7a7a;
}

.fo76-perk {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    width: 100%;
    padding: 6px 10px;
    border: 0;
    background: transparent;
    color: var(--fo76-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.fo76-perk:hover,
.fo76-perk.is-open {
    background: rgba(142, 203, 255, 0.07);
}

.fo76-perk__cost {
    flex: 0 0 22px;
    height: 22px;
    border: 1px solid rgba(142, 203, 255, 0.5);
    color: #8ecbff;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
}

.fo76-perk__main {
    display: grid;
    flex: 1;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 2px 6px;
    min-width: 0;
}

.fo76-perk__name {
    overflow: hidden;
    font-size: 0.86rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fo76-perk .fo76-stars {
    gap: 1px;
}

.fo76-perk .fo76-stars i {
    width: 11px;
    height: 11px;
}

.fo76-perk.is-open .fo76-perk__name {
    white-space: normal;
}

.fo76-perk__desc {
    display: none;
    grid-column: 1 / -1;
    margin-top: 2px;
    color: var(--fo76-muted);
    font-size: 0.84rem;
    font-weight: 400;
    line-height: 1.4;
}

.fo76-perk.is-open .fo76-perk__desc {
    display: block;
}

.fo76-perk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 4px 16px;
}

/* Build card: what tells builds apart, and "Select" level with the title. */
.fo76-build-card__head {
    align-items: center;
}

.fo76-build-card__head .fo76-check {
    flex: none;
    margin: 0;
}

.fo76-build-card__desc {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--fo76-muted);
    font-size: 0.9rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

@media (max-width: 1240px) {
    .fo76-view-specials {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .fo76-view-specials {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fo76-view-mod .fo76-actions {
        margin-left: 0;
    }
}

@media (max-width: 600px) {
    .fo76-view-specials {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Compact head: title and facts on one line, actions as icons, the mod block on one line. */
.fo76-view-head.fo76-panel {
    gap: 10px;
    padding: 14px 20px;
}

.fo76-view-head__top {
    flex-wrap: nowrap;
    align-items: center;
}

.fo76-view-head__info {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
}

.fo76-view-head .fo76-title {
    font-size: 1.25rem;
}

.fo76-view-head__actions {
    flex: none;
    flex-wrap: nowrap;
    gap: 6px;
}

.fo76-view-head .fo76-btn {
    min-height: 34px;
    padding: 5px 11px;
    font-size: 0.88rem;
}

.fo76-view-head .fo76-description {
    font-size: 0.92rem;
    line-height: 1.4;
}

.fo76-view-head .fo76-view-mod {
    gap: 6px 18px;
    padding-top: 10px;
    font-size: 0.9rem;
}

.fo76-view-head .fo76-check {
    margin: 0;
}

/* Gear: two halves, a star's effect in each of four cells; mutations in a strip below. */
.fo76-gear {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fo76-gear-halves {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.fo76-gear-list li > b {
    color: var(--fo76-text);
    font-size: 0.92rem;
}

.fo76-gear-effects {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px 8px;
    margin-top: 3px;
    font-size: 0.8rem;
}

.fo76-gear-effect {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.3;
}

.fo76-gear-effect > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fo76-gear-mutations {
    padding-top: 14px;
    border-top: 1px solid rgba(113, 163, 230, 0.16);
}

.fo76-gear-mutations__list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.fo76-mutation {
    padding: 4px 10px;
    border: 1px solid rgba(143, 220, 120, 0.35);
    background: rgba(143, 220, 120, 0.07);
    color: #bfeeb0;
    font-size: 0.86rem;
}

/* Comments. */
.fo76-comments__count {
    color: var(--fo76-muted);
    font-size: 0.9rem;
    font-weight: 400;
}

.fo76-comment-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
}

/* One line until the text needs more: the script grows it. */
.fo76-comment-form .fo76-input {
    display: block;
    box-sizing: border-box;
    min-height: 38px;
    max-height: 200px;
    padding-top: 8px;
    padding-bottom: 8px;
    overflow: hidden;
    resize: none;
    line-height: 20px;
}

.fo76-comment-form .fo76-btn {
    min-height: 38px;
    padding: 6px 14px;
    font-size: 0.9rem;
}

.fo76-comments {
    display: flex;
    flex-direction: column;
    margin-top: 12px;
}

.fo76-comment {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    padding: 12px 0;
    border-top: 1px solid rgba(113, 163, 230, 0.14);
}

.fo76-comment__avatar {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(142, 203, 255, 0.4);
    background: rgba(142, 203, 255, 0.1);
    color: #8ecbff;
    font-weight: 700;
    line-height: 32px;
    text-align: center;
}

.fo76-comment__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 10px;
}

.fo76-comment__head time {
    color: var(--fo76-muted);
    font-size: 0.8rem;
}

.fo76-comment__body {
    margin: 3px 0 0;
    color: var(--fo76-text);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.fo76-comment__actions {
    display: flex;
    gap: 14px;
    margin-top: 4px;
}

.fo76-comment__action {
    padding: 0;
    border: 0;
    background: none;
    color: var(--fo76-muted);
    font: inherit;
    font-size: 0.82rem;
    cursor: pointer;
}

.fo76-comment__action:hover {
    color: #8ecbff;
}

.fo76-comment__reply-slot .fo76-comment-form {
    margin-top: 8px;
}

.fo76-comment__replies {
    margin-top: 8px;
    padding-left: 12px;
    border-left: 2px solid rgba(113, 163, 230, 0.2);
}

.fo76-comment__replies .fo76-comment {
    padding: 8px 0;
    border-top: 0;
}

@media (max-width: 900px) {
    .fo76-view-head__top {
        flex-wrap: wrap;
    }

    .fo76-gear-halves {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 560px) {
    .fo76-gear-effects {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fo76-comment-form {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* The icon level with the text beside it. */
.fo76-view-mod__id {
    line-height: 1;
}

.fo76-view-mod__id > i {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

/* Names are never cut: they wrap when the column is narrow. */
.fo76-view-special .fo76-perk__name {
    overflow: visible;
    white-space: normal;
}

/* Without a panel behind them: each block carries its own background. */
.fo76-view-special {
    background: linear-gradient(180deg, rgba(22, 33, 61, 0.92), rgba(16, 24, 46, 0.88));
    border-color: rgba(113, 163, 230, 0.28);
}

.fo76-perk-grid {
    gap: 0 8px;
}

.fo76-view-legendary .fo76-view-special__head > .fas,
.fo76-view-legendary .fo76-view-special__head > i {
    color: #f3b63f;
}

/* A wide window: all seven SPECIAL in one row and six legendary perks in another, edge to edge. Stars stay beside the name. */
@media (min-width: 1320px) {
    .fo76-view-specials {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 8px;
    }

    .fo76-perk-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .fo76-view-special__head {
        gap: 4px;
        padding: 6px 7px;
        white-space: nowrap;
    }

    .fo76-view-special__head .fo76-letter {
        flex: none;
        width: 22px;
        height: 22px;
        line-height: 22px;
        font-size: 0.8rem;
    }

    .fo76-view-special__name {
        font-size: 0.8rem;
    }

    .fo76-view-special__value {
        font-size: 0.84rem;
    }

    .fo76-view-special__pts {
        font-size: 0.72rem;
    }

    .fo76-view .fo76-perk {
        gap: 5px;
        padding: 5px 6px;
    }

    .fo76-view .fo76-perk__cost {
        flex-basis: 18px;
        height: 18px;
        font-size: 0.72rem;
        line-height: 16px;
    }

    .fo76-view .fo76-perk__main {
        align-items: start;
        gap: 1px 4px;
    }

    .fo76-view .fo76-perk__name {
        overflow: visible;
        font-size: 0.78rem;
        line-height: 1.2;
        white-space: normal;
    }

    .fo76-view .fo76-perk .fo76-stars {
        margin-top: 2px;
    }

    .fo76-view .fo76-perk .fo76-stars i {
        width: 10px;
        height: 10px;
    }
}

/* Weapons, armor and mutations: three panels of their own. */
.fo76-view .fo76-gear {
    gap: 20px;
}

/* Weapons and armor as tall as each other. */
.fo76-view .fo76-gear-halves {
    align-items: stretch;
}

.fo76-view .fo76-gear-mutations {
    padding-top: 16px;
}

.fo76-view .fo76-gear .fo76-subtitle {
    margin-bottom: 10px;
}

.fo76-view .fo76-gear-list li:last-child {
    border-bottom: 0;
}

.fo76-mutation--clothes {
    border-color: rgba(142, 203, 255, 0.35);
    background: rgba(142, 203, 255, 0.07);
    color: #cfe7ff;
}

.fo76-mutation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px;
}

.fo76-mutation-card {
    padding: 8px 10px;
    border: 1px solid rgba(143, 220, 120, 0.3);
    background: rgba(143, 220, 120, 0.05);
}

.fo76-mutation-card b {
    color: var(--fo76-text);
    font-size: 0.9rem;
}

.fo76-mutation-card__line {
    margin: 3px 0 0;
    font-size: 0.84rem;
    line-height: 1.35;
}

.fo76-mutation-card__line--plus {
    color: #bfeeb0;
}

.fo76-mutation-card__line--minus {
    color: #ff9f9f;
}

/* Legendary perks: six cards in a titled block, gold stars under the name. */
.fo76-view-legendary .fo76-perk-grid {
    gap: 8px;
    padding: 8px;
}

.fo76-view-legendary .fo76-perk,
.fo76-view .fo76-view-legendary .fo76-perk {
    padding: 8px 10px;
    border: 1px solid rgba(243, 182, 63, 0.3);
    background: rgba(243, 182, 63, 0.05);
}

.fo76-view-legendary .fo76-perk:hover,
.fo76-view-legendary .fo76-perk.is-open {
    background: rgba(243, 182, 63, 0.11);
}

.fo76-view .fo76-view-legendary .fo76-perk__main {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
}

.fo76-view-legendary .fo76-perk__name {
    overflow: visible;
    font-size: 0.84rem;
    line-height: 1.25;
    white-space: normal;
}

.fo76-view-legendary .fo76-stars i.is-on {
    background: #f3b63f;
}

/* Each SPECIAL in the colour its cards have in the game. */
.fo76-view-special--s {
    --special: #8fbb9b;
}

.fo76-view-special--p {
    --special: #b08f6a;
}

.fo76-view-special--e {
    --special: #55a6c0;
}

.fo76-view-special--c {
    --special: #e6a64e;
}

.fo76-view-special--i {
    --special: #bcbfa9;
}

.fo76-view-special--a {
    --special: #de7f70;
}

.fo76-view-special--l {
    --special: #a29dcb;
}

.fo76-view-specials .fo76-view-special {
    border-top: 3px solid var(--special);
}

.fo76-view-specials .fo76-view-special__head {
    background: color-mix(in srgb, var(--special) 16%, transparent);
}

.fo76-view-specials .fo76-letter {
    background: var(--special);
    color: #10182c;
}

.fo76-view-specials .fo76-view-special__value {
    color: var(--special);
}

.fo76-view-specials .fo76-perk__cost {
    border-color: var(--special);
    color: var(--special);
}

.fo76-view-specials .fo76-stars i.is-on {
    background: var(--special);
}

.fo76-view-specials .fo76-perk:hover,
.fo76-view-specials .fo76-perk.is-open {
    background: color-mix(in srgb, var(--special) 10%, transparent);
}

/* Editor: weapons and armor in halves, clothes under them across the width. */
.fo76-gear-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fo76-gear-form > .fo76-field:nth-child(3) {
    grid-column: 1 / -1;
}

.fo76-gear-form > .fo76-field:nth-child(3) .fo76-gear-picker {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto;
}

.fo76-gear-form > .fo76-field:nth-child(3) .fo76-gear-rows {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* The star label keeps the width of four stars; the list takes the rest. */
.fo76-gear-form .fo76-gear-stars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 720px) {
    .fo76-gear-form {
        grid-template-columns: minmax(0, 1fr);
    }
}

.fo76-gear-row > .fo76-select {
    width: 100%;
    margin-top: 8px;
}

.fo76-mutation-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 20px;
    margin-bottom: 10px;
}

.fo76-mutation-head .fo76-subtitle {
    margin: 0;
}

.fo76-mutation-switch {
    margin: 0;
    font-size: 0.88rem;
}

/* The step's own indent is taken back, as for the ini button. */
.fo76-mod__actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    margin: 10px 0 0 -34px;
}

.fo76-mod__actions:not(:has(> :not([hidden]))) {
    display: none;
}

.fo76-mod__actions {
    align-items: stretch;
}

.fo76-mod__actions .fo76-btn {
    flex: 0 1 auto;
    box-sizing: border-box;
    height: 40px;
    min-height: 40px;
    margin: 0;
    white-space: nowrap;
}

/* The step's own indent is taken back, so the button starts where the buttons below it do. */
.fo76-mod__ini {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0 0 -34px;
}

.fo76-mod__ini .fo76-btn {
    flex: none;
    box-sizing: border-box;
    height: 40px;
    min-height: 40px;
    margin: 0;
    white-space: nowrap;
}

.fo76-mod__ini-hint {
    min-width: 0;
    line-height: 1.3;
}

.fo76-mod__ini[hidden] {
    display: none;
}

@media (max-width: 760px) {
    .fo76-mod__actions {
        flex-wrap: wrap;
    }
}

.fo76-exportbar [hidden],
.fo76-mod__actions [hidden] {
    display: none;
}

.fo76-mod__installer .fo76-btn {
    flex: none;
    box-sizing: border-box;
    height: 40px;
    min-height: 40px;
    white-space: nowrap;
}

.fo76-steps a.fo76-btn {
    text-decoration: none;
}

.fo76-mod__unsafe {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid rgba(255, 122, 122, 0.45);
    background: rgba(255, 122, 122, 0.06);
}

.fo76-mod__unsafe .fo76-subtitle {
    margin-top: 0;
    color: #ff9c9c;
}

.fo76-mod__unsafe .fo76-mod__actions,
.fo76-mod__extra .fo76-mod__actions {
    margin-left: 0;
}

.fo76-mod__unsafe > p,
.fo76-mod__extra > p {
    margin: 10px 0;
}

.fo76-mod__unsafe .fo76-list li,
.fo76-mod__extra .fo76-list li {
    padding-top: 6px;
    padding-bottom: 6px;
}

.fo76-mod__unsafe .fo76-list,
.fo76-mod__extra .fo76-list {
    margin: 0;
}

.fo76-mod__downloads {
    margin-top: 14px;
}

.fo76-mod .fo76-mod__report {
    color: #e7eefb;
}

.fo76-mod__download {
    padding: 14px 0;
    border-top: 1px solid rgba(113, 163, 230, 0.2);
}

.fo76-mod .fo76-mod__download-title {
    margin: 0 0 10px;
    font-weight: 600;
    color: #e7eefb;
}

.fo76-mod .fo76-mod__download-title--unsafe {
    color: #ff9c9c;
}

.fo76-mod__download .fo76-mod__actions {
    margin-left: 0;
}

.fo76-mod__extra kbd {
    display: inline-block;
    min-width: 1.5em;
    padding: 0 0.35em;
    font-family: inherit;
    font-size: 0.9em;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    color: #8ecbff;
    background: rgba(30, 51, 89, 0.8);
    border: 1px solid rgba(62, 112, 162, 0.9);
}

.fo76-mod__extra {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid rgba(113, 163, 230, 0.2);
}

.fo76-mod__extra .fo76-subtitle {
    margin-top: 0;
}

.fo76-mod .fo76-mod__legal {
    margin: 12px 0 0;
    font-size: 0.62rem;
    line-height: 1.45;
    color: var(--fo76-muted);
}

.fo76-mod__legal a {
    color: #8ecbff;
    text-decoration: underline;
}

.fo76-mod__legal a:hover {
    color: #fff;
}

.fo76-launcher {
    box-sizing: border-box;
    width: 100%;
    max-width: 720px;
    margin: 48px auto;
    padding: 32px;
}

.fo76-launcher .fo76-title {
    display: block;
    width: 100%;
    margin: 0 0 14px;
    text-align: center;
}

.fo76-launcher p {
    margin: 0 0 20px;
    line-height: 1.5;
    text-align: center;
}

.fo76-launcher .fo76-launcher__intro {
    text-align: left;
}

.fo76-launcher > p:last-child {
    margin-bottom: 0;
}

.fo76-launcher .fo76-launcher__code,
.fo76-launcher .fo76-btn {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 44px;
    padding: 0 14px;
}

.fo76-launcher .fo76-launcher__code {
    margin: 0 0 14px;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.08em;
    color: #8ecbff;
    background: rgba(9, 15, 30, 0.6);
    border: 1px solid rgba(113, 163, 230, 0.2);
}

.fo76-launcher .fo76-note {
    margin: 14px 0 0;
    text-align: center;
}

input.fo76-launcher__code {
    font-family: inherit;
    text-align: center;
    text-transform: uppercase;
    outline: none;
}

input.fo76-launcher__code::placeholder {
    color: rgba(142, 203, 255, 0.35);
}

.fo76-launcher .fo76-launcher__error {
    color: #ffb4b4;
}

.fo76-launcher__name {
    white-space: nowrap;
}

.fo76-gear-list .fo76-gear-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fo76-gear-row__name {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.fo76-gear-row__name .fo76-gear-pic {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
}

.fo76-gear-row__name b {
    min-width: 0;
    overflow-wrap: anywhere;
}

.fo76-gear-row__text {
    flex: 1 1 auto;
    min-width: 0;
}

.fo76-gear-pic {
    display: flex;
    flex: 0 0 48px;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: var(--fo76-muted);
    background: rgba(10, 18, 36, 0.45);
    border: 1px solid rgba(113, 163, 230, 0.14);
}

.fo76-gear-pic img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Clothes fill their square; a tall figure keeps its head in view. */
.fo76-gear-pic--fill img {
    object-fit: cover;
    object-position: 50% 0;
}

.fo76-gear-credit {
    margin: 0;
    font-size: 0.72rem;
}

.fo76-view-legendary .fo76-perk {
    pointer-events: none;
}

.fo76-view-legendary .fo76-perk__name {
    white-space: normal;
}

.fo76-view-legendary .fo76-perk__desc {
    display: block;
}

button.fo76-gear-pic {
    padding: 0;
    font: inherit;
    cursor: zoom-in;
    outline: none;
}

button.fo76-gear-pic:hover {
    border-color: rgba(150, 190, 245, 0.5);
}

.fo76-picture-view {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    cursor: zoom-out;
    background: rgba(5, 9, 18, 0.88);
}

.fo76-picture-view img {
    display: block;
    width: min(640px, 100%);
    max-height: 100%;
    object-fit: contain;
}

.fo76-build-card__title {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow-wrap: normal;
}

.fo76-gear-list--clothes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px;
}

.fo76-gear-marks {
    display: block;
    margin-top: 2px;
    font-size: 0.78rem;
    color: #f3b63f;
}

.fo76-gear-row__mod {
    margin-top: 2px;
    font-size: 0.85rem;
    color: var(--fo76-muted);
}
