/* Single presentation source for the player and admin artifact book. */
.artifact-book-board {
    position: relative;
    width: min(400px,calc((100dvh - 36px)/2),100%);
    height: auto;
    min-height: 0;
    aspect-ratio: 1/2;
    margin: 0 auto;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 48%,transparent 0 67px,rgba(139,113,60,.2) 68px 70px,transparent 71px 87px,rgba(139,113,60,.14) 88px 90px,transparent 91px),
        radial-gradient(circle at 50% 48%,rgba(12,13,11,.48),rgba(5,6,5,.08) 57%,transparent 58%),
        linear-gradient(180deg,rgba(255,255,255,.018),rgba(0,0,0,.13));
}
.artifact-book-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
    pointer-events: none;
}
.artifact-book-board.has-art-background { background: transparent; }
.artifact-book-board.has-art-background .artifact-book-emblem,
.artifact-book-board.has-art-background::before,
.artifact-book-board.has-art-background::after { display: none; }
.artifact-book-board::before,.artifact-book-board::after {
    content: '';
    position: absolute;
    left: 50%;
    z-index: 0;
    width: 1px;
    background: linear-gradient(transparent,rgba(165,133,69,.3),transparent);
    transform: translateX(-50%);
}
.artifact-book-board::before { top: 8px; height: 145px; }
.artifact-book-board::after { bottom: 8px; height: 140px; }
.artifact-book-emblem {
    position: absolute;
    top: 48%;
    left: 50%;
    z-index: 0;
    width: 112px;
    height: 120px;
    border: 1px solid rgba(151,120,58,.32);
    border-radius: 50%;
    box-shadow: inset 0 0 24px rgba(0,0,0,.8),0 0 0 9px rgba(10,11,9,.36),0 0 0 10px rgba(151,120,58,.18);
    transform: translate(-50%,-50%) rotate(45deg);
}
.artifact-book-emblem::before,.artifact-book-emblem::after,.artifact-book-emblem span {
    content: '';
    position: absolute;
    inset: 28px;
    border: 1px solid rgba(151,120,58,.25);
}
.artifact-book-emblem::before { transform: rotate(60deg); }
.artifact-book-emblem::after { transform: rotate(-60deg); }
.artifact-blocks-wrapper {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: block;
    width: auto;
}
.artifact-block-card {
    position: absolute;
    width: 120px;
    min-width: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.artifact-block-card:hover { border-color: transparent; box-shadow: none; }
.artifact-block-card:nth-child(1) {
    top: 10%;
    left: 50%;
    flex-direction: column-reverse;
    transform: translateX(-50%);
}
.artifact-block-card:nth-child(2) { bottom: 24%; left: 12.5%; }
.artifact-block-card:nth-child(3) { right: 12.5%; bottom: 24%; }
.artifact-block-card::before {
    position: absolute;
    top: -9px;
    left: 50%;
    color: rgba(200,171,104,.62);
    font-size: .48rem;
    transform: translateX(-50%);
}
.artifact-block-card:nth-child(1)::before { content: 'I'; }
.artifact-block-card:nth-child(2)::before { content: 'II'; }
.artifact-block-card:nth-child(3)::before { content: 'III'; }
.artifact-book-board .artifact-block-card .row-3-slots {
    display: grid;
    grid-template-columns: repeat(2, 55px);
    grid-template-rows: repeat(2, 55px);
    justify-content: center;
    gap: 6px;
}
.artifact-book-board .artifact-block-card .row-3-slots .doll-slot:first-child {
    grid-column: 1 / -1;
    justify-self: center;
}
.artifact-book-board .artifact-block-card:nth-child(1) .row-3-slots .doll-slot:first-child {
    grid-row: 2;
}
.artifact-book-board .row-3-slots .doll-slot {
    width: 55px;
    height: 55px;
    border-color: rgba(155, 124, 61, .62);
    border-radius: 10px;
    background: rgba(4, 5, 5, .72);
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .45), 0 0 10px rgba(0, 0, 0, .48);
}
.artifact-book-board .artifact-block-card .row-4-slots {
    display: grid;
    grid-template-columns: repeat(2, 45px);
    grid-template-rows: repeat(2, 45px);
    justify-content: center;
    gap: 5px;
}
.artifact-book-board .row-4-slots .doll-slot {
    width: 45px;
    height: 45px;
    border-color: rgba(155,124,61,.38);
    border-radius: 10px;
    background: rgba(4,5,5,.62);
}
.artifact-book-board .doll-slot[data-artifact-kind="attack"] {
    border-color: rgba(211,63,63,.92);
    box-shadow: inset 0 0 0 2px rgba(0,0,0,.45),0 0 12px rgba(194,43,43,.32);
}
.artifact-book-board .doll-slot[data-artifact-kind="defense"] { border-color: rgba(83,132,196,.72); }
.artifact-book-board .doll-slot[data-artifact-kind="support"] { border-color: rgba(89,158,111,.72); }

.artifact-book-bonuses{position:absolute;z-index:4;left:6%;right:6%;bottom:1.5%;padding:8px 10px;border:1px solid #c6b77a38;border-radius:7px;background:linear-gradient(135deg,#151a22e8,#090c12e8);font-size:clamp(8px,1.05vw,11px);line-height:1.35;text-align:center;pointer-events:none}.artifact-book-bonuses>strong{display:block;color:#d5c995;margin-bottom:3px}.artifact-book-background{background-size:contain!important}

/* Keep the native book geometry when the window is reduced. */
.artifact-book-board{container-type:inline-size}
.artifact-book-board .artifact-block-card{width:30cqw;gap:2cqw}
.artifact-book-board .artifact-block-card .row-3-slots{grid-template-columns:repeat(2,13.75cqw);grid-template-rows:repeat(2,13.75cqw);gap:1.5cqw}
.artifact-book-board .row-3-slots .doll-slot{width:13.75cqw;height:13.75cqw;border-radius:3px}
.artifact-book-board .artifact-block-card .row-4-slots{grid-template-columns:repeat(2,11.25cqw);grid-template-rows:repeat(2,11.25cqw);gap:1.25cqw}
.artifact-book-board .row-4-slots .doll-slot{width:11.25cqw;height:11.25cqw;border-radius:3px}
.artifact-book-bonuses{font-size:2.65cqw;padding:2cqw 2.5cqw}

.artifact-block-card::before{content:none!important}
