/* Item cards, chips, and item summary layouts. */

.category-section {
    display: grid;
    gap: 14px;
}

.category-section h2 {
    margin: 0;
    font-size: 1.35rem;
    letter-spacing: 0;
}

.weapon-contents {
    display: grid;
    gap: 34px;
}

.item-family-section-list,
.item-effect-section-list {
    display: grid;
    gap: 28px;
}

.item-family-category-section,
.item-effect-category-section {
    gap: 10px;
}

.item-section-title {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 10px;
}

.item-section-title-icon {
    position: relative;
    display: inline-grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    overflow: visible;
    line-height: 0;
}

.item-section-title-icon img {
    position: absolute;
    bottom: 0;
    left: 50%;
    display: block;
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    object-fit: contain;
    transform: translateX(-50%);
}

.item-index-heading {
    display: grid;
    gap: 12px;
    margin-bottom: 8px;
}

.item-index-heading h1 {
    margin: 0;
    color: #2c180a;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 3.8rem;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1;
    text-shadow: 1px 1px 0 #fff3c8;
}

.item-family-index-heading {
    gap: 0;
    margin-bottom: 4px;
}

.item-family-index-heading h1 {
    font-size: clamp(1.55rem, 2.4vw, 2rem);
    font-weight: 400;
    line-height: 1.15;
    text-shadow: none;
}

@media (max-width: 720px) {
    .item-index-heading h1 {
        font-size: 2.6rem;
    }

    .item-family-index-heading h1 {
        font-size: 1.55rem;
    }

    .item-section-title-icon {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
    }
}

.category-section.item-family-category-section h2 {
    color: #2f1809;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.45rem, 2.2vw, 1.85rem);
    font-weight: 400;
    line-height: 1.15;
    text-transform: none;
}

.item-effect-category-section h2 {
    color: #2f1809;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.35rem, 2.2vw, 2rem);
    font-weight: 900;
    line-height: 1;
    text-transform: none;
}

.race-summary {
    display: grid;
    gap: 8px;
}

.item-family-group-title {
    margin: 8px 0 0;
    color: #20130a;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.15rem, 1.8vw, 1.5rem);
    font-weight: 400;
    line-height: 1.15;
}

.item-family-group--subtypes {
    gap: 12px;
    padding: 12px;
    border: 1px solid #8f6a47;
}

.item-family-group--subtypes > .item-family-group-title {
    margin: 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(143, 106, 71, 0.58);
}

.item-family-subtype-list,
.item-family-subtype-group {
    display: grid;
}

.item-family-subtype-list {
    gap: 18px;
}

.item-family-subtype-group {
    gap: 7px;
}

.item-family-subtype-title {
    margin: 0;
    color: #5d3210;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.15;
}

.weapon-family-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 6px;
}

.weapon-family-card {
    display: grid;
    align-content: center;
    justify-items: center;
    min-height: 82px;
    gap: 7px;
    padding: 8px 10px 10px;
    border: 1px solid #20130a;
    border-radius: 0;
    background: transparent;
    color: #1f1208;
    text-align: center;
    box-shadow: none;
    transition: background 120ms ease, color 120ms ease;
}

.weapon-family-card:hover,
.weapon-family-card:focus-visible {
    background: rgba(255, 248, 223, 0.5);
    color: #7a1a13;
    text-decoration: none;
}

.weapon-family-card > span {
    display: block;
    min-width: 0;
    width: 100%;
}

.weapon-family-card strong {
    display: block;
    overflow-wrap: break-word;
    color: inherit;
    font-size: 0.95rem;
    font-weight: 400;
    hyphens: none;
    line-height: 1.15;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: normal;
    word-break: normal;
}

.weapon-family-card:hover strong,
.weapon-family-card:focus-visible strong {
    color: inherit;
}

.result-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.result-columns h3 {
    margin: 0 0 10px;
    font-size: 0.95rem;
    color: var(--muted);
}

.compact-row {
    display: flex;
    align-items: center;
    min-height: 58px;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(143, 106, 71, 0.55);
    text-decoration: none;
}

.compact-row:last-child {
    border-bottom: 0;
}

.compact-row img,
.item-icon {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff8df;
}

.compact-row img[src*="/mob_icon.php"] {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    object-fit: contain;
}

.compact-row.no-icon {
    padding-left: 0;
}

.compact-row strong,
.compact-row small,
.entity-card strong,
.entity-card small {
    display: block;
}

.compact-row:hover strong {
    color: #990000;
    text-decoration: underline;
}

.compact-row strong {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.effect-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.effect-card {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--panel-border);
}

.effect-card-link {
    color: inherit;
    text-decoration: none;
}

.effect-card-head {
    display: flex;
    align-items: center;
    min-height: 62px;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(143, 106, 71, 0.38);
}

.effect-card-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 1px solid var(--line);
    border-radius: 8px 2px 8px 2px;
}

.effect-card-head h2 {
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 0.95rem;
    font-weight: 900;
    line-height: 1.18;
}

.effect-card-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 10px 12px;
    border-top: 1px solid rgba(143, 106, 71, 0.24);
}

.effect-card-row:first-of-type {
    border-top: 0;
}

.effect-card-row span {
    min-width: 0;
    color: #5f4b3d;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.25;
}

.effect-card-row strong {
    justify-self: end;
    min-width: 54px;
    padding: 4px 8px;
    border: 1px solid;
    border-radius: 6px 2px 6px 2px;
    font-size: 0.82rem;
    font-weight: 900;
    line-height: 1.15;
    text-align: center;
}

.effect-card-row--duration strong {
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #2f1809;
}

.entity-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.entity-card {
    display: flex;
    align-items: flex-start;
    min-height: 126px;
    gap: 12px;
    padding: 14px;
    transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.entity-body {
    min-width: 0;
}

.entity-card strong {
    overflow-wrap: anywhere;
    line-height: 1.25;
}

.entity-card em {
    display: -webkit-box;
    margin-top: 8px;
    overflow: hidden;
    color: var(--muted);
    font-style: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Item and armory surfaces. */

.effect-card,
.item-shop-card {
    border-color: var(--panel-border);
    border-radius: 2px 2px 16px 2px;
    background:
        linear-gradient(180deg, rgba(255, 252, 231, 0.82), rgba(238, 230, 197, 0.9)),
        var(--paper);
    box-shadow: var(--shadow), var(--inset-shadow);
}

.category-section h2 {
    color: #2c180a;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 900;
    text-shadow: 1px 1px 0 #fff3c8;
}

.effect-card-icon,
.item-shop-head img {
    border-color: #8b6040;
    background: #fff9df;
    box-shadow: inset 0 0 8px rgba(112, 68, 27, 0.16);
}

.entity-card strong,
.compact-row strong,
.effect-card-head h2 {
    color: #261607;
}

.effect-card-head {
    border-color: #6f241b;
    background:
        linear-gradient(180deg, rgba(255, 244, 196, 0.54), rgba(226, 201, 132, 0.62)),
        #e7d59e;
}

.effect-card-row strong {
    border-color: rgba(140, 33, 21, 0.42);
    background: rgba(140, 33, 21, 0.08);
    color: var(--accent);
}
