/* RNDBOX 확률 고지 (리뉴얼) — 토큰은 rb.css. 포팅 probability.page.css 를 대체합니다.
   JS 훅(probability.js): .hashbox_list .hashbox(.text.active) .hashbox_complicated .complicated [data-setting|live|diff]
   .live_box_name .live_total .box_division .probability_section(.is-loading) .probability_division.X …element_probability_section */

.pb-page { padding-top: 4.8rem; padding-bottom: 8rem; }
.pb-head .rb-title { margin-top: .8rem; }
.pb-head .rb-desc a, .probability_sample_info a, .additional_info a { color: var(--rb-violet); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* 등급 배지 */
.pb-ground {
    display: inline-flex; align-items: center; height: 2.6rem; padding: 0 1rem; border-radius: 999px;
    font: 800 1.2rem/1 var(--rb-font-display); letter-spacing: .06em; white-space: nowrap; color: #fff; background: #5F6675;
}
.pb-ground.ground_x { background: var(--rb-g-x-bg); color: #fff; }
.pb-ground.ground_a { background: var(--rb-g-a); color: var(--rb-g-a-on); }
.pb-ground.ground_b { background: var(--rb-g-b); color: #fff; }
.pb-ground.ground_c { background: var(--rb-g-c); color: #fff; }
.pb-ground.ground_d { background: var(--rb-g-d); color: #fff; }
.pb-ground.ground_e { background: var(--rb-g-e); color: #fff; }

/* 박스·카테고리 선택 */
.pb-pickers { display: grid; gap: 1.6rem; margin: 4rem 0 3.2rem; }
.pb-boxes {
    display: flex; gap: 1rem; overflow-x: auto; padding: .4rem .2rem 1rem; scrollbar-width: none; overscroll-behavior-x: contain;
}
.pb-boxes::-webkit-scrollbar { display: none; }
.pb-boxes .hashbox {
    display: flex; flex-direction: column; align-items: center; gap: .8rem; flex: 1 0 11.6rem; min-width: 11.6rem; padding: 1.2rem 1rem 1.4rem;
    border: 1px solid var(--rb-line); border-radius: var(--rb-radius-lg); background: #fff; cursor: pointer;
    transition: border-color .2s, box-shadow .2s, transform .2s var(--rb-ease);
}
.pb-boxes .hashbox:hover { transform: translateY(-2px); box-shadow: var(--rb-shadow-2); }
.pb-boxes .hashbox[aria-pressed="true"] { border-color: var(--rb-violet); box-shadow: 0 0 0 1px var(--rb-violet), var(--rb-shadow-1); }
.pb-boxes .hashbox img { position: static; width: 7.2rem; height: 7.2rem; border-radius: 1.4rem; object-fit: cover; }
.pb-boxes .hashbox .text { font: 700 1.3rem/1.2 var(--rb-font-display); color: var(--rb-ink-2); white-space: nowrap; }
.pb-boxes .hashbox .text.active { color: var(--rb-violet); }
.pb-cats .complicated_list { display: flex; flex-wrap: wrap; gap: .8rem; }
.pb-cats .complicated {
    display: inline-flex; align-items: center; min-height: 4.4rem; padding: 0 1.8rem;
    border: 1px solid var(--rb-line-2); border-radius: 999px; background: #fff; color: var(--rb-ink-2);
    font: 500 1.4rem/1.2 var(--rb-font); cursor: pointer; transition: background-color .2s, color .2s, border-color .2s;
}
.pb-cats .complicated:hover { border-color: var(--rb-ink-4); color: var(--rb-ink); }
.pb-cats .complicated.active { border-color: var(--rb-ink); background: var(--rb-ink); color: #fff; font-weight: 600; }

/* 등급별 확률 표 */
.pb-card { padding: 2.8rem; border: 1px solid var(--rb-line); border-radius: var(--rb-radius-xl); background: #fff; box-shadow: var(--rb-shadow-1); }
.pb-card__head h2 { margin: 0 0 2rem; font: 800 2.2rem/1.3 var(--rb-font-display); letter-spacing: -.01em; color: var(--rb-ink); }
.pb-table-wrap { overflow-x: auto; }
.pb-table { width: 100%; border-collapse: collapse; font-size: 1.45rem; }
.pb-table th, .pb-table td { padding: 1.3rem 1.2rem; text-align: right; border-bottom: 1px solid var(--rb-line); white-space: nowrap; }
.pb-table thead th { padding-top: 0; font-size: 1.3rem; font-weight: 600; color: var(--rb-ink-3); }
.pb-table th:first-child { text-align: left; }
.pb-table tbody tr:last-child th, .pb-table tbody tr:last-child td { border-bottom: 0; }
.pb-table td { font: 700 1.6rem/1.2 var(--rb-font-display); color: var(--rb-ink); font-variant-numeric: tabular-nums; }
.pb-table td.pb-diff { font-weight: 600; color: var(--rb-ink-3); }
.probability_sample_info { margin: 1.6rem 0 0; font-size: 1.3rem; line-height: 1.6; color: var(--rb-ink-3); }

/* 등급별 상품 목록 */
.pb-lists { margin-top: 6.4rem; }
.pb-lists__head { display: flex; align-items: baseline; gap: 1.2rem; flex-wrap: wrap; margin-bottom: 2.4rem; }
.pb-lists__head .box_division { margin: 0; font: 800 3rem/1.25 var(--rb-font-display); letter-spacing: -.02em; color: var(--rb-ink); }
.pb-lists__head .joint_probability { font-size: 1.35rem; color: var(--rb-ink-3); }
.probability_section { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem; transition: opacity .15s; }
.probability_section.is-loading { opacity: .5; }
.probability_division { min-width: 0; padding: 2rem 2.4rem; border-radius: var(--rb-radius-lg); background: var(--rb-bg-2); }
.probability_division .division_section { margin: 0 0 1.2rem; }
.element_probability_section { display: grid; }
.product_element { display: grid; grid-template-columns: minmax(0, 1fr) auto 6.4rem; align-items: center; gap: 1.2rem; min-height: 4.4rem; padding: .6rem 0; border-bottom: 1px solid var(--rb-line); font-size: 1.4rem; }
.product_element:last-child { border-bottom: 0; }
.product_element .product_name { min-width: 0; color: var(--rb-ink); line-height: 1.45; }
.product_element .product_price { color: var(--rb-ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.product_element .product_probability { text-align: right; font: 700 1.4rem/1 var(--rb-font-display); color: var(--rb-ink); font-variant-numeric: tabular-nums; }
.product_element.empty { display: block; color: var(--rb-ink-3); text-align: center; border: 0; }

/* 안내 */
.pb-notes { display: grid; gap: 1.6rem; margin-top: 6.4rem; }
.additional_info, .pb-alerts { padding: 2.4rem 2.8rem; border-radius: var(--rb-radius-lg); background: var(--rb-bg-2); font-size: 1.35rem; line-height: 1.75; color: var(--rb-ink-2); }
.additional_info p, .pb-alerts p { margin: 0; }
.additional_info p + p { margin-top: .4rem; }
.pb-alerts h2 { margin: 0 0 .8rem; font: 700 1.6rem/1.4 var(--rb-font-display); color: var(--rb-ink); }

@media (max-width: 1023px) {
    .probability_section { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
    .pb-page { padding-top: 3.2rem; padding-bottom: 4.8rem; }
    .pb-pickers { margin: 2.8rem 0 2.4rem; }
    .pb-boxes { margin: 0 calc(var(--rb-gutter) * -1); padding: .4rem var(--rb-gutter) 1rem; }
    .pb-boxes .hashbox { flex: 0 0 10rem; min-width: 10rem; padding: 1rem .8rem 1.2rem; }
    .pb-boxes .hashbox img { width: 6rem; height: 6rem; }
    .pb-cats .complicated { min-height: 4rem; padding: 0 1.4rem; font-size: 1.3rem; }
    .pb-card { padding: 2rem 1.6rem; border-radius: var(--rb-radius-lg); }
    .pb-card__head h2 { font-size: 1.8rem; margin-bottom: 1.2rem; }
    .pb-table { font-size: 1.3rem; }
    .pb-table th, .pb-table td { padding: 1.1rem .6rem; }
    .pb-table td { font-size: 1.4rem; }
    .pb-table thead th { font-size: 1.15rem; white-space: normal; }
    .pb-ground { height: 2.4rem; padding: 0 .8rem; font-size: 1.05rem; }
    .pb-lists__head .box_division { font-size: 2.2rem; }
    .probability_division { padding: 1.6rem; }
    .product_element { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name prob" "price prob"; row-gap: .2rem; font-size: 1.35rem; }
    .product_element .product_name { grid-area: name; }
    .product_element .product_price { grid-area: price; font-size: 1.25rem; }
    .product_element .product_probability { grid-area: prob; }
    .additional_info, .pb-alerts { padding: 2rem; font-size: 1.3rem; }
}

.pb-head .rb-eyebrow { letter-spacing: .04em; }
