/* Character equipment: stable slot indices, compact columns at opposite edges. */
#equipmentPicker {
    width: min(560px, calc(100% - 24px));
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
}

#potionPurchaseDialog {
    width: min(440px, calc(100% - 24px));
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
}
#inventoryDiscardDialog {
    width: min(620px, calc(100% - 16px));
    max-width: calc(100% - 16px);
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    overflow-x: hidden;
    overflow-wrap: anywhere;
}
.discard-equipment-list,
.discard-stack-list {
    display: grid;
    min-width: 0;
    gap: 10px;
    margin: 12px 0;
}
.discard-select-all,
.discard-gear-choice {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 10px;
    padding: 6px 0;
}
.discard-gear-choice > span:last-child {
    min-width: 0;
}
.discard-gear-choice small {
    display: block;
    letter-spacing: normal;
}
.discard-stack-list button,
#inventoryDiscardDialog input[type='number'] {
    width: 100%;
    min-width: 0;
    white-space: normal;
}
.discard-group {
    margin: 14px 0;
    border: 0;
}
.discard-group > summary {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    cursor: pointer;
    list-style: none;
    font-size: 16px;
    font-weight: 700;
}
.discard-group > summary::-webkit-details-marker {
    display: none;
}
.discard-group-thread {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 8px;
    color: var(--gold);
}
.discard-group-thread::after {
    flex: 1;
    height: 1px;
    background: var(--line);
    content: '';
}
.discard-chevron {
    font-size: 24px;
}
.discard-group[open] > summary .discard-chevron {
    transform: rotate(90deg);
}
.discard-stack-list > button[data-delete-stack] {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border: 0;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    text-align: left;
    font-size: inherit;
}
.discard-stack-art,
.discard-gear-choice > span:first-of-type {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}
.discard-stack-art img,
.discard-gear-choice img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}
.discard-book .discard-stack-art .item-book-glyph {
    font-size: 42px;
}
#potionPurchaseDialog label {
    display: block;
    margin: 12px 0 4px;
}
#potionPurchaseDialog output {
    font-weight: 700;
    color: var(--gold);
}
#potionPurchaseQuantity {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    accent-color: var(--gold);
}

.equipment-picker-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 120px;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.equipment-picker-item > span {
    font-size: 40px;
}

.gear-rank {
    border-color: var(--gear-rank-color);
    box-shadow: none;
}
.gear-rank-1 {
    --gear-rank-color: #88928e;
    box-shadow: none;
}
.gear-rank-2 {
    --gear-rank-color: #38a65b;
}
.gear-rank-3 {
    --gear-rank-color: #3989e8;
}
.gear-rank-4 {
    --gear-rank-color: #a363df;
}
.gear-rank-5 {
    --gear-rank-color: #df9b29;
}
.gear-rank-6 {
    --gear-rank-color: #e45686;
}
#equipmentRankDialog {
    width: min(720px, calc(100% - 24px));
    overflow-wrap: anywhere;
}
#equipmentRankDialog [aria-pressed='true'] {
    outline: 2px solid var(--gold);
    outline-offset: -4px;
}
.equipment-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    margin: 0;
    border-radius: 8px;
}
.equipment-slot:hover {
    border-color: var(--gold);
}
.equipment-slot:disabled {
    cursor: default;
}
.equipment-slot:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}
.equipment-name {
    overflow-wrap: anywhere;
}
.gear-art {
    display: block;
    width: 56px;
    height: 56px;
    object-fit: contain;
}
.equipment-detail-art {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}
.equipment-detail-art .gear-art {
    width: 160px;
    height: 160px;
}
.forge-result-image .gear-art {
    width: 96px;
    height: 96px;
    margin: 0 auto;
}
#equipmentDetails,
#discardGearDialog,
#forgetAbilityDialog {
    width: min(440px, calc(100% - 24px));
    overflow-wrap: anywhere;
}
#chat {
    cursor: pointer;
}
body.chat-open #chat {
    cursor: auto;
}
.scroll-icon {
    display: inline-block;
    position: relative;
    font-size: 28px;
    margin-right: 12px;
    vertical-align: middle;
}
.stack-count {
    position: absolute;
    top: 5px;
    right: 5px;
    display: inline-grid;
    place-items: center;
    background: url('../img/quantity-badge-v1.png') center / 100% 100% no-repeat;
    color: #332316;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    min-width: 38px;
    height: 38px;
    white-space: nowrap;
    text-align: center;
}
#skillDetails {
    width: min(440px, calc(100% - 24px));
}

.skill-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
}
.skill-list button {
    text-align: left;
}
.skill-list .muted {
    display: block;
    margin-top: 4px;
    font-size: 11px;
}

.inventory-count {
    font-size: 12px;
    color: var(--muted);
}

header h1 {
    font-size: clamp(18px, 5vw, 26px);
}

header {
    justify-content: space-between;
    flex-shrink: 0;
}
header #menu {
    flex: 0 0 44px;
    width: 44px;
    padding: 6px;
    font-size: 24px;
}
#playerStatus #vitals {
    flex: 0 1 260px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-right: auto;
    min-width: 0;
}
#playerStatus .vital {
    min-width: 0;
    font-size: 12px;
}
#playerStatus .vital > span {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    white-space: nowrap;
}
#playerStatus .vital-icon {
    font-size: 17px;
    line-height: 1;
    flex: 0 0 auto;
}
#playerStatus .vital b {
    font-weight: 500;
}
header #close {
    flex: 0 0 44px;
    order: 3;
    margin-left: auto;
}
#hero {
    padding: 10px;
}
.bag-section .bag-section {
    grid-column: 1 / -1;
    margin-block: 0;
}
.bag-section .bag-section > h3 {
    margin: 0;
}
#bag-items-scrolls {
    row-gap: 4px;
    align-content: start;
}
#hero .row {
    font-size: 13px;
}
@media (max-width: 360px) {
    #playerStatus #vitals {
        gap: 8px;
    }
    #playerStatus .vital {
        font-size: 11px;
    }
    header {
        gap: 6px;
    }
}
.equipment-layout {
    display: grid;
    grid-template-columns: minmax(0, 112px) minmax(0, 112px);
    grid-template-areas: none;
    justify-content: space-between;
    width: 100%;
    max-width: none;
    gap: 32px;
    margin: 14px 0;
    background: none;
}
.equipment-zone {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 6px;
    min-width: 0;
}
.equipment-layout.has-class-portrait {
    grid-template-columns: minmax(0, 144px) minmax(0, 1fr) minmax(0, 144px);
    column-gap: clamp(4px, 1vw, 12px);
}
.class-portrait {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    min-width: 0;
    margin: 0;
    pointer-events: none;
}
.class-portrait img {
    display: block;
    width: 100%;
    max-width: 340px;
    height: auto;
    object-fit: contain;
}
@media (max-width: 480px) {
    .equipment-layout.has-class-portrait {
        grid-template-columns: minmax(0, 28%) minmax(0, 1fr) minmax(0, 28%);
    }
}
.equipment-zone h4 {
    font-size: 13px;
    color: var(--muted);
    text-align: center;
    margin: 0 0 4px;
}
.equipment-zone .equipment-slot {
    grid-area: auto;
    min-height: 112px;
    padding: 8px 4px;
    border: 0;
    background: transparent;
    gap: 6px;
}
.equipment-zone .slot-icon {
    display: block;
    width: 100%;
    min-width: 0;
    overflow: visible;
    font-size: clamp(32px, 14vw, 56px);
    line-height: 1;
}
.equipment-zone .slot-icon .gear-art {
    width: 100%;
    max-width: 144px;
    height: auto;
    aspect-ratio: 1;
    margin-inline: auto;
}
.equipment-zone .equipment-name {
    font-size: 11px;
    line-height: 1.2;
}
.equipment-zone .equipment-slot:disabled {
    opacity: 0.65;
}
.equipment-zone .equipment-slot,
#chatProfile .profile-item {
    border: 0;
    background: transparent;
    box-shadow: none;
}
:root:not([data-theme='dark']) .equipment-zone .equipment-slot,
:root:not([data-theme='dark']) #chatProfile .profile-item {
    background: transparent;
}
.equipment-slot.gear-rank .slot-icon,
.profile-item.gear-rank > span[aria-hidden] {
    border-radius: 0;
    background: transparent;
    filter: none;
}
/* Keep complete diagonal art inside a square; outline light follows the transparent image. */
.has-class-portrait [data-slot-index='3'],
.has-class-portrait [data-slot-index='2'] {
    transform: translateX(clamp(6px, 2vw, 12px));
}
.has-class-portrait [data-slot-index='7'],
.has-class-portrait [data-slot-index='0'] {
    transform: translateX(clamp(-12px, -2vw, -6px));
}
.has-class-portrait [data-slot-index='8'] {
    transform: translateX(clamp(4px, 1vw, 8px));
}
.has-class-portrait [data-slot-index='9'] {
    transform: translateX(clamp(-8px, -1vw, -4px));
}
.equipment-slot.gear-rank-1 .slot-icon,
.profile-item.gear-rank-1 > span[aria-hidden] {
    background: transparent;
    filter: none;
}
/* Selected preview: light follows only the alpha silhouette. Art size and hit targets never animate. */
.gear-rank:not(.gear-rank-1) .gear-art {
    animation: gear-rarity-outline 4s ease-in-out infinite;
}
@keyframes gear-rarity-outline {
    0%,
    100% {
        filter: drop-shadow(0 0 1px var(--gear-rank-color))
            drop-shadow(0 0 3px var(--gear-rank-color));
    }
    50% {
        filter: drop-shadow(0 0 3px var(--gear-rank-color))
            drop-shadow(0 0 9px var(--gear-rank-color));
    }
}
@media (prefers-reduced-motion: reduce) {
    .gear-rank:not(.gear-rank-1) .gear-art {
        animation: none;
        filter: drop-shadow(0 0 1px var(--gear-rank-color))
            drop-shadow(0 0 4px var(--gear-rank-color));
    }
}
.equipment-label {
    font-size: 10px;
    line-height: 1.2;
}
.equipment-empty {
    font-size: 10px;
    color: var(--muted);
}
.inventory-sections {
    display: flex;
    gap: 8px;
    margin: 12px 0;
}
.inventory-sections button {
    flex: 1;
    padding: 8px;
    font-size: 13px;
}
.inventory-sections .active {
    border-color: var(--gold);
    color: var(--gold);
}
.inventory-sections button span {
    display: inline-block;
    margin-left: 4px;
    font-size: 11px;
}
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
}
.inventory-grid .inventory-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin: 0;
    padding: 10px;
    text-align: center;
    overflow-wrap: anywhere;
}
.inventory-tile-icon {
    position: static;
    display: grid;
    place-items: center;
    align-self: center;
    width: 76px;
    height: 76px;
    font-size: 32px;
    margin: 4px auto 12px;
}
/* One painted nine-slice frame: corners stay intact on short and tall item cards. */
.inventory-grid .inventory-tile,
[data-economy-root] .inventory-tile {
    --item-frame-color: var(--gear-rank-color, #a28a56);
    position: relative;
    isolation: isolate;
    border: 1px solid transparent;
    border-radius: 14px;
    padding: 20px 14px 22px;
    background: var(--panel);
    box-shadow:
        0 0 8px color-mix(in srgb, var(--item-frame-color) 25%, transparent),
        0 3px 9px #0000000c;
}
.inventory-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 24px solid transparent;
    border-image-source: url('../img/item-frame-v1.png');
    border-image-slice: 22%;
    border-image-width: 24px;
    border-image-repeat: stretch;
    pointer-events: none;
}
.inventory-tile .stack-count {
    z-index: 1;
}
.inventory-tile:focus-within {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}
.inventory-tile strong {
    font-size: 12px;
    line-height: 1.35;
}
.inventory-tile p {
    font-size: 11px;
    line-height: 1.45;
    margin: 7px 0;
}
.inventory-tile-actions {
    display: grid;
    gap: 5px;
    margin-top: auto;
    padding-top: 6px;
}
.inventory-tile-actions button {
    min-height: 44px;
    font-size: 12px;
    padding: 6px;
}
.craft-materials {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
    margin: 10px 0 16px;
}
.craft-material-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    min-height: 112px;
    padding: 10px;
    font-size: 12px;
    text-align: center;
    overflow-wrap: anywhere;
    background: var(--panel);
}
.craft-material-card.primary {
    border: 2px solid var(--gold);
    color: inherit;
    background: var(--panel);
}
.craft-material-icon {
    position: relative;
    font-size: 30px;
}
.craft-material-card .muted {
    font-size: 11px;
}
.craft-submit {
    width: 100%;
    margin-bottom: 12px;
}

/* Shared Book preview: paper page, actual item art and the profile's rarity halo. */
dialog:has(> .item-book) {
    box-sizing: border-box;
    width: min(520px, calc(100% - 24px));
    max-width: calc(100% - 24px);
    max-height: calc(100dvh - 24px);
    padding: 0;
    overflow-y: auto;
    overflow-wrap: anywhere;
}
.item-book {
    min-width: 0;
    padding: 20px;
    color: inherit;
    background: var(--panel);
}
.item-book .item-book-heading {
    position: relative;
    display: block;
    min-height: 44px;
    padding: 0 42px 14px 0;
    border: 0;
    background: transparent;
}
.item-book-heading h2 {
    margin: 0;
    font-family: Georgia, serif;
    font-size: clamp(22px, 6vw, 30px);
    line-height: 1.2;
}
.item-book-heading p {
    margin: 6px 0 0;
    font-size: 12px;
}
.item-book-heading form {
    margin: 0;
}
.item-book .item-book-close {
    position: absolute;
    top: -8px;
    right: -10px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 30px;
    line-height: 1;
}
.item-book .item-book-close:focus,
.item-book .item-book-close:focus-visible {
    outline: none;
    box-shadow: none;
}
.item-book-spread {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding-block: 12px 20px;
    border-block: 1px solid var(--line);
}
.item-book-art {
    display: grid;
    place-items: center;
    min-width: 0;
    margin: 0;
    border: 0;
    box-shadow: none;
}
.item-book-art .slot-icon {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 1;
}
.item-book-art .gear-art {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
}
.item-book-glyph {
    font-size: clamp(48px, 15vw, 76px);
}
.item-book-art .potion-icon {
    width: 90px;
    height: 90px;
}
.item-book-stats {
    margin: 0;
    font-size: 12px;
}
.item-book-stats > div {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 8px;
    padding-block: 8px;
    border-bottom: 1px solid var(--line);
}
.item-book-stats dt {
    color: var(--muted);
}
.item-book-stats dd {
    margin: 0;
    font-weight: 700;
}
.item-book-body {
    padding-top: 16px;
    font-size: 13px;
    line-height: 1.55;
}
.item-book-budget {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 26px;
    overflow: hidden;
    border: 1px solid var(--gold);
    border-radius: 4px;
    background: var(--panel);
}
.item-book-budget i {
    position: absolute;
    inset: 0 auto 0 0;
    background: color-mix(in srgb, #4c815c 35%, var(--panel));
}
.item-book-budget > span {
    position: relative;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}
.item-book-budget-note,
.item-book-id {
    color: var(--muted);
    font-size: 11px;
}
.item-book-set h3 {
    margin: 18px 0 6px;
    font-family: Georgia, serif;
    font-size: 18px;
}
.item-book-set h4 {
    margin: 10px 0 6px;
    font-size: 12px;
}
.item-book-set p {
    margin: 6px 0;
}
.item-book-set ul {
    margin: 6px 0;
    padding-left: 18px;
}
.item-book-set li {
    margin-block: 6px;
}
.item-set-pending {
    color: var(--muted);
    border-top: 1px solid var(--line);
    margin-top: 14px;
    padding-top: 4px;
}
.item-book-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}
.item-book-actions button {
    flex: 1;
    min-height: 44px;
}
.rune-workshop-list {
    display: grid;
    gap: 16px;
    margin-block: 16px;
}
.rune-workshop-choice {
    padding-block: 8px;
    border-bottom: 1px solid var(--line);
}
.rune-workshop-choice button {
    min-height: 44px;
}

/* Forge uses the same paper, text, rarity art and tapered dividers as item previews. */
.forge-workbench {
    max-width: 780px;
    margin: 0 auto;
    color: inherit;
}
.forge-workbench h2 {
    margin: 8px 0 24px;
    font-family: Georgia, serif;
    font-size: clamp(24px, 4vw, 34px);
}
.forge-section {
    margin: 14px 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
}
.forge-section > summary {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 12px 16px;
    font-family: Georgia, serif;
    font-size: clamp(18px, 3vw, 24px);
    cursor: pointer;
    list-style: none;
}
.forge-section > summary::-webkit-details-marker {
    display: none;
}
.forge-section > summary > span:first-child {
    color: var(--gold);
}
.forge-chevron {
    width: 10px;
    height: 10px;
    margin: 0 4px 4px auto;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    flex-shrink: 0;
}
.forge-section[open] > summary .forge-chevron {
    transform: rotate(225deg);
    margin-bottom: 0;
}
.forge-section-body {
    position: relative;
    padding: 16px;
    font-size: 14px;
    line-height: 1.5;
}
.forge-section-body::before,
.forge-budget::before {
    position: absolute;
    top: 0;
    left: 10%;
    width: 80%;
    height: 3px;
    background: var(--line);
    clip-path: polygon(0 50%, 50% 0, 100% 50%, 50% 100%);
    content: '';
}
.forge-explanation {
    margin: 0 0 18px;
    text-align: center;
    color: var(--muted);
}
.forge-quality-flow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 12px minmax(0, 0.65fr) 12px minmax(0, 1fr);
    align-items: center;
    gap: 5px;
}
.forge-combine-flow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}
.forge-item-tile,
.forge-stone-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 10px 5px;
    text-align: center;
    overflow-wrap: anywhere;
}
.forge-item-tile {
    border: 1px solid var(--line);
    border-radius: 10px;
}
.forge-role,
.forge-rarity {
    font-size: 12px;
    color: var(--muted);
}
.forge-large-art {
    display: flex;
    align-items: center;
    justify-content: center;
    height: clamp(86px, 18vw, 150px);
    width: 100%;
}
.forge-large-art .gear-art,
.forge-large-art img {
    width: 100%;
    max-width: 150px;
    height: 100%;
    object-fit: contain;
}
.forge-empty-slot {
    color: var(--muted);
    font-size: 44px;
}
.forge-stone-tile img,
.forge-workbench .craft-material-icon img {
    max-width: 100%;
    object-fit: contain;
}
.forge-stone-tile {
    font-size: 12px;
}
.forge-math {
    color: var(--gold);
    text-align: center;
    font-size: 22px;
}
.forge-main-action {
    display: block;
    width: 100%;
    min-height: 48px;
    margin: 18px 0 2px;
    border-color: var(--gold);
    font-size: 16px;
}
.forge-stat-line {
    margin: 16px 0;
    text-align: center;
}
.forge-stat-choice {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.forge-stat-choice > p {
    width: 100%;
    margin-bottom: 0;
}
.forge-stat-choice button {
    flex: 1;
    min-height: 44px;
}
.forge-budget {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 20px 8px;
    text-align: center;
}
.forge-budget > details > summary {
    min-width: 44px;
    cursor: pointer;
    list-style: none;
}
.forge-budget > details[open] p {
    position: absolute;
    right: 0;
    bottom: 55px;
    left: 0;
    z-index: 2;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
}
.forge-workbench .craft-materials {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
}

/* Existing hand-drawn inventory frame surrounds the section, not each equipment image. */
.forge-section {
    position: relative;
    border: 0;
    border-radius: 8px;
}
.forge-section::after {
    position: absolute;
    inset: 0;
    border: 18px solid transparent;
    border-image-source: url('../img/item-frame-v1.png');
    border-image-slice: 22%;
    border-image-width: 18px;
    border-image-repeat: stretch;
    pointer-events: none;
    content: '';
}
.forge-workbench .forge-item-tile {
    border: 0;
    box-shadow: none;
    background: transparent;
    color: inherit;
    font-size: inherit;
}
.forge-quality-flow {
    grid-template-columns: minmax(0, 1fr) 30px minmax(0, 0.85fr) 30px minmax(0, 1fr);
}
.forge-quality-flow .forge-stone-tile img {
    width: 116px;
    height: 116px;
}
.forge-math {
    font-size: clamp(30px, 5vw, 46px);
    font-weight: 700;
}
.forge-heading-icon {
    display: inline-block;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    background: var(--gold);
    mask-image: var(--forge-heading-image);
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
    -webkit-mask-image: var(--forge-heading-image);
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
}
@media (max-width: 380px) {
    .forge-quality-flow {
        gap: 2px;
        grid-template-columns: minmax(0, 1fr) 22px minmax(0, 0.8fr) 22px minmax(0, 1fr);
    }
    .forge-item-tile,
    .forge-stone-tile {
        padding: 8px 0;
        font-size: 12px;
    }
}

.forge-workbench {
    box-sizing: border-box;
    width: 100%;
    padding: 18px;
}
.forge-section > summary {
    padding: 18px 22px;
}
.forge-section-body {
    padding: 20px 22px;
}
.forge-heading-icon {
    background: transparent;
    mask-image: none;
    -webkit-mask-image: none;
}
.forge-heading-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
:root:not([data-theme='dark']) .forge-heading-icon img {
    filter: brightness(0.48);
}
@media (max-width: 380px) {
    .forge-workbench {
        padding: 10px;
    }
    .forge-section > summary {
        padding: 16px 18px;
    }
    .forge-section-body {
        padding: 18px;
    }
}
