.ornates-shell {
    box-sizing: border-box;
    padding: 18px 12px 40px;
    width: min(1160px, 100%);
}

.collection-summary {
    align-items: center;
    color: #f5f5f5;
    display: flex;
    flex-wrap: wrap;
    font-family: Arial, sans-serif;
    font-size: 1rem;
    gap: 10px;
    justify-content: center;
    margin: -4px 0 14px;
    text-shadow: -1px 0 #000, 0 1px #000, 1px 0 #000, 0 -1px #000;
}

.summary-divider {
    color: #c7c7ba;
}

.page-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 0 auto 20px;
}

.page-tabs a {
    background: #0f0f3d;
    border: 2px solid #939388;
    border-radius: 8px;
    box-shadow: 0 .1em .3em .1em rgba(0, 0, 0, .6);
    font-family: Arial, sans-serif;
    padding: 9px 15px;
    text-decoration: none;
}

.page-tabs a[aria-current="page"] {
    border-color: #fff8cc;
    box-shadow: 0 0 .65em rgba(255, 248, 204, .65);
}

.ilevel-section {
    margin: 0 0 22px;
}

.ilevel-heading {
    font-size: 2rem;
    margin: 0 0 10px;
}

.set-panel {
    background-color: rgba(15, 15, 61, .93);
    background-image: url('../images/texture.png');
    border: 2px solid #939388;
    border-radius: 10px;
    box-shadow: 0 .1em .3em .1em rgba(0, 0, 0, .6);
    margin: 0 0 14px;
    outline: 2px solid rgba(128, 128, 128, .35);
    outline-offset: -5px;
    padding: 18px 20px 22px;
}

.set-header {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    margin: 0 2px 12px;
}

.set-title {
    color: #fff;
    font-size: 1.45rem;
    justify-content: flex-start;
    margin: 0;
    text-align: left;
    text-shadow: -1px 0 #000, 0 1px #000, 1px 0 #000, 0 -1px #000;
}

.set-progress {
    color: #d7ddd9;
    font-family: Arial, sans-serif;
    font-size: .9rem;
}

.ornate-grid {
    background: #080824;
    border-radius: 4px;
    box-shadow: inset 0 0 5px rgba(255, 255, 255, .6);
    display: grid;
    gap: 0;
    grid-template-columns: repeat(5, 88px);
    justify-content: center;
    overflow-x: auto;
    padding: 14px;
}

.ornate-tile {
    align-items: flex-start;
    background: transparent;
    border: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    padding: 0 3px;
    position: relative;
    width: 88px;
    box-sizing: border-box;
}

.ornate-item-button {
    align-items: center;
    background: transparent;
    display: flex;
    height: 82px;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    position: relative;
    width: 82px;
}

.ornate-item-button img {
    display: block;
    height: 78px;
    object-fit: contain;
    width: 78px;
}

.ornate-item-button.unowned {
    filter: grayscale(100%) brightness(.55);
    opacity: .82;
}

.ornate-item-button.owned {
    filter: none;
    opacity: 1;
}


.ornate-item-button,
#icon {
    isolation: isolate;
}

.ornate-item-button img,
#modalIconImage {
    position: relative;
    z-index: 1;
}

.ornate-hq-glow,
.modal-hq-glow {
    background-image: url('../images/hq-glow.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    mix-blend-mode: screen;
    pointer-events: none;
    position: absolute;
    z-index: 2;
}

.ornate-hq-glow {
    inset: 2px;
}

.modal-hq-glow {
    inset: 0;
}

.ornate-hq-glow[hidden],
.modal-hq-glow[hidden] {
    display: none;
}

.ornate-counter {
    bottom: -4px;
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 1.25rem;
    pointer-events: none;
    position: absolute;
    right: 1px;
    text-shadow: -1px 0 #000, 0 1px #000, 1px 0 #000, 0 -1px #000;
    z-index: 3;
}

.item-caption {
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: .76rem;
    line-height: 1.2;
    margin-top: 0;
    max-width: 82px;
    min-height: 2.8em;
    overflow-wrap: anywhere;
    text-align: left;
    text-shadow: -1px 0 #000, 0 1px #000, 1px 0 #000, 0 -1px #000;
}

#icon {
    align-items: center;
    background: #080824;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

#modalIconImage {
    height: 78px;
    object-fit: contain;
    width: 78px;
}

.item-meta {
    color: #d9e2dc;
    font-family: Arial, sans-serif;
    font-size: .9rem;
    margin: -10px 20px 10px;
    text-align: center;
}

.universalis-link {
    color: #fff8cc;
    font-family: Arial, sans-serif;
    font-size: .85rem;
}

.multi-nav {
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.compact-nav {
    width: 18em;
}

@media (max-width: 600px) {
    .ornates-shell {
        padding-left: 8px;
        padding-right: 8px;
    }

    .ornate-grid {
        justify-content: start;
        padding: 10px;
    }

    .set-panel {
        padding-left: 12px;
        padding-right: 12px;
    }

    .ornate-item-button {
        height: 76px;
        width: 76px;
    }

    .ornate-item-button img {
        height: 72px;
        width: 72px;
    }

    .compact-nav {
        width: 300px;
    }
}



/* Match the compact Items-page footprint instead of stretching sets across the page. */
.ornates-shell {
    box-sizing: border-box;
    max-width: calc(100vw - 24px);
    padding-left: 0;
    padding-right: 0;
    width: 560px;
}

#ornateSets,
.ilevel-section {
    width: 100%;
}

.set-panel {
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.ornate-grid {
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
    width: max-content;
    max-width: 100%;
}

@media (max-width: 600px) {
    .ornates-shell {
        max-width: calc(100vw - 12px);
        width: 560px;
    }
}


/* Ornates page heading alignment */
.ornates-page-title {
    color: #fff;
    display: block;
    font-size: 2.55rem;
    line-height: 1.1;
    margin: 4px auto 18px;
    text-align: center;
    width: 100%;
}
.ornates-shell > .site-header {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}
.ornates-shell > .top-nav {
    justify-content: center;
}
@media (max-width: 600px) {
    .ornates-page-title { font-size: 2.15rem; }
}
\n\n/* Compact Ornates header: title, identity, then navigation without a second page title. */
.ornates-shell {
    padding-top: 8px;
}
.ornates-header {
    margin: 0 auto 6px;
    text-align: center;
}
.ornates-header .ornates-page-title {
    color: #fff;
    display: block;
    font-size: clamp(1.5rem, 5vw, 2.55rem);
    line-height: 1.05;
    margin: 0 auto 10px;
    padding: 0;
    text-align: center;
    text-shadow: -1px 0 #000, 0 1px #000, 1px 0 #000, 0 -1px #000;
    white-space: nowrap;
    width: 100%;
}
.ornates-header .site-identity {
    font-size: 1.08rem;
    line-height: 1.18;
    margin: 2px 0;
}
.ornates-shell > .top-nav {
    flex-wrap: nowrap;
    gap: 10px;
    justify-content: center;
    margin: 10px auto 12px;
    padding: 0 4px;
}
.ornates-shell > .top-nav .navBtn {
    min-height: 52px;
    padding: 0 10px;
    width: 10em;
}
.ornates-shell > .top-nav .navText {
    font-size: 1.55em;
}
.collection-summary {
    margin-top: 0;
}
@media (max-width: 560px) {
    .ornates-header .ornates-page-title {
        font-size: clamp(1.4rem, 6.4vw, 2rem);
    }
    .ornates-shell > .top-nav {
        gap: 7px;
        padding-left: 4px;
        padding-right: 4px;
    }
    .ornates-shell > .top-nav .navBtn {
        min-height: 46px;
        width: calc((100vw - 52px) / 3);
    }
    .ornates-shell > .top-nav .navText {
        font-size: 1.08em;
    }
}
