/* Seren Spirits v4.0.17 beta: official item rarity table */
.page-items .official-drop-panel {
    padding: 1rem 1.05rem 1.1rem;
}

.page-items .official-drop-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.25rem;
    align-items: end;
    padding-bottom: .9rem;
    border-bottom: 1px solid var(--line);
}

.page-items .official-drop-header h2 {
    margin: .25rem 0 0;
    font-size: clamp(1.6rem, 2.2vw, 2.35rem);
    line-height: 1;
}

.page-items .official-drop-header p {
    max-width: 720px;
    margin: .55rem 0 0;
    color: var(--muted);
    font-size: .76rem;
    line-height: 1.5;
}

.page-items .official-drop-heading-meta {
    display: grid;
    justify-items: end;
    gap: .45rem;
    text-align: right;
}

.page-items .official-drop-heading-meta strong {
    max-width: 420px;
    color: var(--gold);
    font-size: .78rem;
    line-height: 1.4;
}

.page-items .official-drop-grid {
    display: grid;
    gap: .7rem;
    margin-top: .9rem;
}

.page-items .official-drop-grid article {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid var(--line);
    border-radius: 7px;
    background: rgba(5, 24, 31, .56);
    overflow: hidden;
}

.page-items .official-drop-grid article > span {
    min-width: 0;
    padding: .8rem .85rem;
}

.page-items .official-drop-grid article > span + span {
    border-left: 1px solid var(--line);
}

.page-items .official-drop-grid small,
.page-items .official-drop-grid strong {
    display: block;
}

.page-items .official-drop-grid small {
    color: var(--muted);
    font-size: .58rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.page-items .official-drop-grid strong {
    margin-top: .3rem;
    color: var(--text);
    font-size: .82rem;
}

.page-items .official-drop-grid article > span:nth-child(2) strong {
    color: var(--gold);
}

.page-items .official-luck-note {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: .7rem;
    align-items: start;
    margin-top: .8rem;
    padding: .75rem .8rem;
    border-left: 3px solid var(--cyan);
    background: rgba(12, 69, 72, .18);
}

.page-items .official-luck-note .icon {
    width: 22px;
    height: 22px;
    color: var(--cyan-bright);
}

.page-items .official-luck-note b,
.page-items .official-luck-note span {
    display: block;
}

.page-items .official-luck-note b {
    margin-bottom: .2rem;
    color: var(--cyan-bright);
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.page-items .official-luck-note span {
    color: var(--text);
    font-size: .76rem;
    line-height: 1.45;
}

@media (max-width: 760px) {
    .page-items .official-drop-header {
        grid-template-columns: 1fr;
    }
    .page-items .official-drop-heading-meta {
        justify-items: start;
        text-align: left;
    }
    .page-items .official-drop-grid article {
        grid-template-columns: 1fr;
    }
    .page-items .official-drop-grid article > span + span {
        border-top: 1px solid var(--line);
        border-left: 0;
    }
}

/* Seren Spirits v4.0.18 beta: item overview redesign */
.page-items .item-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .9fr) minmax(250px, .72fr);
    gap: 1rem;
    align-items: stretch;
}

.page-items .item-overview-panel {
    min-width: 0;
    padding: 1rem 1.05rem;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    background: linear-gradient(145deg, rgba(8, 31, 39, .9), rgba(3, 16, 23, .94));
    box-shadow: inset 0 1px rgba(255,255,255,.025), 0 12px 28px rgba(0,0,0,.16);
}

.page-items .item-overview-panel > header {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding-bottom: .8rem;
    border-bottom: 1px solid var(--line);
}

.page-items .item-overview-icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border: 1px solid rgba(71,239,227,.28);
    border-radius: 8px;
    color: var(--cyan-bright);
    background: rgba(12, 72, 76, .18);
}

.page-items .item-overview-icon .icon {
    width: 21px;
    height: 21px;
}

.page-items .item-overview-panel header small,
.page-items .item-overview-panel header strong {
    display: block;
}

.page-items .item-overview-panel header small {
    color: var(--cyan-bright);
    font-size: .58rem;
    font-weight: 900;
    letter-spacing: .08em;
}

.page-items .item-overview-panel header strong {
    margin-top: .15rem;
    color: var(--text);
    font-size: .82rem;
    line-height: 1.2;
}

.page-items .item-record-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: .8rem;
}

.page-items .item-record-stats > div {
    min-width: 0;
    padding: .2rem .85rem .1rem 0;
}

.page-items .item-record-stats > div + div {
    padding-left: .85rem;
    border-left: 1px solid var(--line);
}

.page-items .item-record-stats span,
.page-items .item-market-stats span {
    display: block;
    color: var(--muted);
    font-size: .68rem;
}

.page-items .item-record-stats strong,
.page-items .item-market-stats strong {
    display: block;
    margin-top: .35rem;
    color: var(--gold);
    font-family: var(--serif);
    font-size: clamp(1.65rem, 2vw, 2.35rem);
    font-weight: 600;
    line-height: .95;
    white-space: nowrap;
}

.page-items .item-market-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: .8rem;
}

.page-items .item-market-stats > div {
    min-width: 0;
    padding-right: .75rem;
}

.page-items .item-market-stats > div + div {
    padding-left: .85rem;
    border-left: 1px solid var(--line);
}

.page-items .item-market-stats strong {
    font-size: clamp(1.45rem, 1.75vw, 2rem);
}

.page-items .item-rate-panel {
    display: flex;
    flex-direction: column;
}

.page-items .item-rate-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-top: .85rem;
}

.page-items .item-rate-main > strong {
    min-width: 0;
    color: var(--gold);
    font-family: var(--serif);
    font-size: clamp(1.8rem, 2.2vw, 2.55rem);
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.page-items .item-rate-panel footer {
    margin-top: auto;
    padding-top: .65rem;
    color: var(--muted);
    font-size: .65rem;
    line-height: 1.35;
}

@media (max-width: 1180px) {
    .page-items .item-overview-grid {
        grid-template-columns: 1fr 1fr;
    }
    .page-items .item-record-panel {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .page-items .item-overview-grid {
        grid-template-columns: 1fr;
    }
    .page-items .item-record-panel {
        grid-column: auto;
    }
    .page-items .item-record-stats,
    .page-items .item-market-stats {
        grid-template-columns: 1fr;
    }
    .page-items .item-record-stats > div,
    .page-items .item-market-stats > div {
        padding: .65rem 0;
    }
    .page-items .item-record-stats > div + div,
    .page-items .item-market-stats > div + div {
        padding-left: 0;
        border-top: 1px solid var(--line);
        border-left: 0;
    }
}

/* Seren Spirits v4.0.19 beta: item intelligence split + complete 30-day chart */
.page-items .item-intelligence-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
    gap: 1rem;
    align-items: stretch;
}

.page-items .item-intelligence-grid > :only-child {
    grid-column: 1 / -1;
}

.page-items .item-intelligence-panel {
    min-width: 0;
    height: 100%;
}

.page-items .item-activity-panel {
    display: flex;
    flex-direction: column;
    padding: 1rem 1.05rem 1.05rem;
}

.page-items .item-activity-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: end;
    padding-bottom: .85rem;
    border-bottom: 1px solid var(--line);
}

.page-items .item-activity-header h2 {
    margin: .25rem 0 0;
    font-size: clamp(1.65rem, 2.15vw, 2.35rem);
    line-height: 1;
}

.page-items .item-activity-header p {
    margin: .5rem 0 0;
    color: var(--muted);
    font-size: .7rem;
}

.page-items .item-activity-summary {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: .75rem;
    align-items: end;
}

.page-items .item-activity-summary span {
    display: grid;
    gap: .15rem;
    color: var(--muted);
    font-size: .58rem;
    text-align: right;
    white-space: nowrap;
}

.page-items .item-activity-summary b {
    color: var(--gold);
    font-family: var(--serif);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1;
}

.page-items .item-activity-chart {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: .5rem;
    min-height: 235px;
    margin-top: .9rem;
}

.page-items .item-chart-scale {
    display: grid;
    grid-template-rows: auto 1fr auto 1fr auto;
    align-items: center;
    padding-bottom: 22px;
    color: var(--muted-2);
    font-size: .55rem;
    text-align: right;
}

.page-items .item-chart-scale span:nth-child(1) { grid-row: 1; }
.page-items .item-chart-scale span:nth-child(2) { grid-row: 3; }
.page-items .item-chart-scale span:nth-child(3) { grid-row: 5; }

.page-items .item-chart-plot {
    position: relative;
    min-width: 0;
    min-height: 210px;
}

.page-items .item-chart-gridlines {
    position: absolute;
    inset: 0 0 22px;
    display: grid;
    grid-template-rows: 1fr 1fr 1fr;
    pointer-events: none;
}

.page-items .item-chart-gridlines i {
    border-top: 1px solid rgba(111, 179, 181, .14);
}

.page-items .item-chart-gridlines i:last-child {
    border-bottom: 1px solid rgba(111, 179, 181, .18);
}

.page-items .item-chart-bars {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(30, minmax(4px, 1fr));
    gap: clamp(2px, .35vw, 5px);
    align-items: end;
}

.page-items .item-chart-day {
    display: grid;
    grid-template-rows: minmax(0, 1fr) 20px;
    min-width: 0;
    height: 100%;
    align-items: end;
}

.page-items .item-chart-bar {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 3px;
    align-items: flex-end;
    border-radius: 4px 4px 2px 2px;
    background: rgba(9, 52, 61, .36);
    overflow: hidden;
}

.page-items .item-chart-day.has-activity .item-chart-bar {
    min-height: 8px;
    background: linear-gradient(to top, rgba(7, 143, 149, .9), var(--cyan));
    box-shadow: 0 0 12px rgba(71, 239, 227, .18);
}

.page-items .item-chart-bar i {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,.22), transparent 38%);
}

.page-items .item-chart-day.is-empty .item-chart-bar {
    height: 3px !important;
}

.page-items .item-chart-day small {
    align-self: end;
    justify-self: center;
    color: var(--muted-2);
    font-size: .52rem;
    line-height: 20px;
    white-space: nowrap;
}

.page-items .item-chart-day:hover .item-chart-bar {
    outline: 1px solid rgba(119, 255, 244, .72);
    outline-offset: 1px;
}

.page-items .item-activity-footer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
    margin-top: .8rem;
    padding-top: .75rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .62rem;
    line-height: 1.4;
}

.page-items .item-activity-footer span:last-child {
    text-align: right;
}

.page-items .item-activity-footer b {
    color: var(--text);
    font-weight: 700;
}

@media (max-width: 1180px) {
    .page-items .item-intelligence-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .page-items .item-activity-header {
        grid-template-columns: 1fr;
        align-items: start;
    }
    .page-items .item-activity-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
    }
    .page-items .item-activity-summary span {
        text-align: left;
    }
    .page-items .item-activity-chart {
        overflow-x: auto;
    }
    .page-items .item-chart-plot {
        min-width: 620px;
    }
    .page-items .item-activity-footer {
        grid-template-columns: 1fr;
    }
    .page-items .item-activity-footer span:last-child {
        text-align: left;
    }
}


/* Seren Spirits v4.0.20 beta: remove duplicate drop-table panel */
.page-items .item-rate-details {
    margin-top: .75rem;
    border-top: 1px solid var(--line);
}

.page-items .item-rate-details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .72rem 0 0;
    color: var(--cyan-bright);
    font-size: .68rem;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.page-items .item-rate-details summary::-webkit-details-marker {
    display: none;
}

.page-items .item-rate-details summary .icon {
    width: 16px;
    height: 16px;
    transition: transform .18s ease;
}

.page-items .item-rate-details[open] summary .icon {
    transform: rotate(90deg);
}

.page-items .item-rate-rolls {
    display: grid;
    gap: .45rem;
    margin-top: .65rem;
}

.page-items .item-rate-rolls > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(90px, .72fr) minmax(0, 1fr);
    border: 1px solid var(--line);
    border-radius: 7px;
    background: rgba(3, 17, 23, .5);
    overflow: hidden;
}

.page-items .item-rate-rolls span {
    min-width: 0;
    padding: .55rem .6rem;
}

.page-items .item-rate-rolls span + span {
    border-left: 1px solid var(--line);
}

.page-items .item-rate-rolls small,
.page-items .item-rate-rolls strong {
    display: block;
}

.page-items .item-rate-rolls small {
    color: var(--muted);
    font-size: .52rem;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.page-items .item-rate-rolls strong {
    margin-top: .2rem;
    color: var(--text);
    font-size: .68rem;
    line-height: 1.3;
}

.page-items .item-rate-rolls span:nth-child(2) strong {
    color: var(--gold);
}

.page-items .item-rate-luck {
    margin: .6rem 0 0;
    padding: .62rem .68rem;
    border-left: 3px solid var(--cyan);
    color: var(--muted);
    background: rgba(12, 69, 72, .16);
    font-size: .65rem;
    line-height: 1.45;
}

.page-items .item-rate-luck b {
    color: var(--cyan-bright);
}

.page-items .item-activity-full {
    width: 100%;
}

.page-items .item-activity-full .item-activity-chart {
    min-height: 270px;
}

.page-items .item-activity-full .item-chart-plot {
    min-height: 245px;
}

@media (max-width: 760px) {
    .page-items .item-rate-rolls > div {
        grid-template-columns: 1fr;
    }
    .page-items .item-rate-rolls span + span {
        border-top: 1px solid var(--line);
        border-left: 0;
    }
}

/* Seren Spirits v4.0.22 beta: proof-backed item history ledger */
.page-items .item-history-panel {
    padding: 1rem 1.05rem 1.1rem;
}

.page-items .item-history-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.25rem;
    align-items: end;
    padding-bottom: .95rem;
    border-bottom: 1px solid var(--line);
}

.page-items .item-history-header h2 {
    margin: .22rem 0 0;
    font-size: clamp(1.75rem, 2.35vw, 2.6rem);
    line-height: 1;
}

.page-items .item-history-header p {
    max-width: 720px;
    margin: .5rem 0 0;
    color: var(--muted);
    font-size: .76rem;
    line-height: 1.5;
}

.page-items .item-history-tools {
    display: grid;
    justify-items: end;
    gap: .7rem;
}

.page-items .item-history-summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .45rem;
}

.page-items .item-history-summary span {
    display: inline-flex;
    align-items: center;
    min-height: 29px;
    padding: .35rem .58rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--muted);
    background: rgba(4, 18, 24, .62);
    font-size: .62rem;
    white-space: nowrap;
}

.page-items .item-history-summary b {
    margin-right: .28rem;
    color: var(--text);
    font-size: .7rem;
}

.page-items .item-history-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
    margin-top: .9rem;
}

.page-items .item-history-entry {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(7, 28, 36, .78), rgba(3, 16, 22, .86));
    transition: border-color .18s ease, transform .18s ease, background .18s ease;
}

.page-items .item-history-entry:hover {
    border-color: var(--line-strong);
    background: linear-gradient(145deg, rgba(9, 36, 44, .84), rgba(3, 18, 24, .9));
    transform: translateY(-1px);
}

.page-items .item-history-entry.is-latest {
    border-color: rgba(71, 239, 227, .42);
    box-shadow: inset 3px 0 0 var(--cyan);
}

.page-items .item-history-contributor {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .9rem;
    align-items: center;
    padding: .75rem .8rem;
    border-bottom: 1px solid var(--line);
    box-shadow: inset 3px 0 0 rgba(71, 239, 227, .45);
}


.page-items .item-history-contributor small,
.page-items .item-history-contributor a {
    display: block;
}

.page-items .item-history-contributor small {
    color: var(--muted);
    font-size: .56rem;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.page-items .item-history-contributor div > a {
    margin-top: .15rem;
    overflow: hidden;
    color: var(--text);
    font-size: .82rem;
    font-weight: 800;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-items .item-history-contributor div > a:hover {
    color: var(--cyan-bright);
}

.page-items .item-history-latest {
    padding: .2rem .42rem;
    border: 1px solid rgba(71, 239, 227, .35);
    border-radius: 5px;
    color: var(--cyan-bright);
    background: rgba(13, 84, 86, .22);
    font-size: .55rem;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.page-items .item-history-stats {
    display: grid;
    grid-template-columns: .72fr .9fr 1.38fr;
}

.page-items .item-history-stats > span,
.page-items .item-history-stats > time {
    min-width: 0;
    padding: .72rem .78rem;
}

.page-items .item-history-stats > * + * {
    border-left: 1px solid var(--line);
}

.page-items .item-history-stats small,
.page-items .item-history-stats strong,
.page-items .item-history-stats em {
    display: block;
}

.page-items .item-history-stats small {
    color: var(--muted);
    font-size: .55rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.page-items .item-history-stats strong {
    margin-top: .25rem;
    overflow: hidden;
    color: var(--gold);
    font-family: var(--serif);
    font-size: 1.05rem;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-items .item-history-stats time strong {
    color: var(--text);
    font-family: var(--sans);
    font-size: .72rem;
}

.page-items .item-history-stats em {
    margin-top: .18rem;
    color: var(--muted);
    font-size: .6rem;
    font-style: normal;
    white-space: nowrap;
}

.page-items .item-history-entry > footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    padding: .65rem .8rem;
    border-top: 1px solid var(--line);
}

.page-items .item-history-entry > footer > span {
    color: var(--muted);
    font-size: .6rem;
    line-height: 1.4;
}

.page-items .item-history-entry > footer .button {
    flex: 0 0 auto;
}

.page-items .item-history-empty {
    grid-column: 1 / -1;
    min-height: 150px;
}

@media (max-width: 1040px) {
    .page-items .item-history-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .page-items .item-history-header {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .page-items .item-history-tools {
        justify-items: start;
    }

    .page-items .item-history-summary {
        justify-content: flex-start;
    }
}

@media (max-width: 520px) {
    .page-items .item-history-stats {
        grid-template-columns: 1fr 1fr;
    }

    .page-items .item-history-stats > time {
        grid-column: 1 / -1;
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    .page-items .item-history-entry > footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-items .item-history-entry > footer .button {
        width: 100%;
        justify-content: center;
    }
}
