/* ===================================================================
 * OLYMPUS · THE TREASURY (store front + Rank Benefits, 2026-11-01)
 * The owner's redesign draft: navy panels, struck gold, a rarity scale,
 * a rank ladder and a purchase rail. Loaded after style.css by index.php
 * and ranks.php only; everything here is prefixed tr- / rb- or scoped to
 * body.treasury so the other store pages are untouched.
 * =================================================================== */
body.treasury {
    --tr-panel:   #11182b;
    --tr-panel-2: #161f35;
    --tr-line:    rgba(255, 255, 255, 0.08);
    --tr-line-2:  rgba(255, 255, 255, 0.14);
    --tr-gold:    #e9bd62;
    --tr-gold-2:  #fff0b1;
    --tr-muted:   #9ba8c0;
    --tr-text:    #f6f4ef;
    /* rarity scale: bronze starter, blue premium, purple divine, gold prestige, red limited/seasonal */
    --r-bronze: #c58b55;
    --r-blue:   #6d9dff;
    --r-purple: #b58cff;
    --r-gold:   #e9bd62;
    --r-red:    #ef6d73;
    background: radial-gradient(circle at 75% -10%, #253a6a 0, #0b1021 35%, #070b18 72%) fixed;
}

.tr-backdrop {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1100px;
    background: url('/assets/img/art/home/home-island.jpg') center top / cover no-repeat;
    opacity: 0.10;
    -webkit-mask-image: linear-gradient(#000 0%, transparent 100%);
            mask-image: linear-gradient(#000 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

.tr-page {
    position: relative;
    z-index: 2;
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 28px 80px;
}

.tr-eyebrow {
    color: var(--tr-gold);
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-size: 11px;
    font-weight: 700;
}
.tr-muted { color: var(--tr-muted); }
.tr-link {
    color: var(--tr-gold);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    white-space: nowrap;
}
.tr-link:hover { color: var(--tr-gold-2); }

.tr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s, box-shadow .2s, border-color .2s, background .2s;
}
.tr-btn-gold {
    background: linear-gradient(135deg, #ffe39a, #c99b42);
    border: 0;
    color: #1a1420;
    box-shadow: 0 7px 25px rgba(209, 166, 80, 0.27);
}
.tr-btn-gold:hover { color: #1a1420; transform: translateY(-1px); box-shadow: 0 10px 30px rgba(209, 166, 80, 0.4); }
.tr-btn-gold:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.tr-btn-gold.is-success { background: linear-gradient(135deg, #b8f0c8, #5fbf80); }
.tr-btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.17);
    color: var(--tr-text);
}
.tr-btn-ghost:hover { border-color: rgba(233, 189, 98, 0.6); color: var(--tr-gold-2); }

.tr-section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin: 44px 0 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--tr-line);
}
.tr-section-head h2 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 28px;
    color: #fff9e7;
    letter-spacing: 0.02em;
}
.tr-section-head p { margin: 6px 0 0; color: var(--tr-muted); font-size: 13px; }
.tr-section-head p a { color: var(--tr-gold); }

/* -------------------- Hero -------------------- */
.tr-hero {
    position: relative;
    margin: 30px 0 18px;
    min-height: 420px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 28px;
    align-items: center;
    padding: 40px 40px 40px 7%;
    border: 1px solid rgba(214, 173, 90, 0.33);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.5);
    background:
        linear-gradient(100deg, rgba(9, 14, 30, 0.96) 0%, rgba(9, 14, 30, 0.86) 42%, rgba(9, 14, 30, 0.45) 75%, rgba(9, 14, 30, 0.7) 100%),
        url('/assets/img/art/home/home-island-2.jpg') center 35% / cover no-repeat;
}
.tr-hero.tr-hero-solo { grid-template-columns: minmax(0, 1fr); }
.tr-hero-copy, .tr-showcase { min-width: 0; }
.tr-hero::after {
    content: "";
    position: absolute;
    left: 4%; top: 0;
    width: 60%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--tr-gold), transparent);
    box-shadow: 0 0 22px var(--tr-gold);
    opacity: .7;
}
.tr-hero-copy { position: relative; z-index: 2; max-width: 600px; }
.tr-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(36px, 4.6vw, 58px);
    line-height: 1.02;
    margin: 16px 0;
    color: #fff9e7;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
}
.tr-hero p { color: #c7cce0; line-height: 1.7; max-width: 520px; font-size: 15px; }
.tr-hero code, .tr-trust code, .tr-delivery code, .tr-rail code { color: var(--tr-gold-2); background: rgba(0, 0, 0, 0.3); padding: 1px 6px; border-radius: 4px; }
.tr-hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* the featured carousel, compacted into the hero's showcase card (markup + store.js unchanged) */
.tr-showcase { position: relative; z-index: 2; }
.tr-showcase .hero-carousel {
    background: rgba(10, 16, 34, 0.82);
    -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}
.tr-showcase .hero-slide {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 22px 22px 46px;
    min-height: 0;
    text-align: center;
}
.tr-showcase .hero-slide-art { width: 170px; height: 170px; }
.tr-showcase .hero-slide-content { padding: 0; }
.tr-showcase .hero-slide-tag { margin: 0 auto 6px; }
.tr-showcase .hero-slide-name { font-size: 22px; margin-bottom: 6px; letter-spacing: 0.03em; }
.tr-showcase .hero-slide-price { font-size: 26px; margin-bottom: 14px; }
.tr-showcase .hero-slide-cta { justify-content: center; }
.tr-showcase .hero-slide-cta .btn { height: 40px; padding: 0 18px; font-size: 11px; }
.tr-showcase .hero-arrow { width: 32px; height: 32px; font-size: 18px; top: 95px; }
.tr-showcase .hero-arrow-prev { left: 10px; }
.tr-showcase .hero-arrow-next { right: 10px; }
.tr-showcase .hero-dots { bottom: 16px; }

/* -------------------- Trust strip -------------------- */
.tr-trust {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 0 0 8px;
}
.tr-trust div {
    padding: 15px 18px;
    border: 1px solid var(--tr-line);
    background: rgba(255, 255, 255, 0.025);
    border-radius: 12px;
    color: var(--tr-muted);
    font-size: 12.5px;
}
.tr-trust strong { display: block; color: #f5f1e5; font-size: 13px; margin-bottom: 4px; }

/* -------------------- Layout: content + purchase rail -------------------- */
.tr-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 28px;
    align-items: start;
    padding-top: 6px;
}
.tr-content { min-width: 0; }
.tr-content > .flash { margin-top: 22px; }
/* sticky, but never taller than the window: on a short screen (a 200% DPI laptop is ~650px of CSS height) the rail
   scrolls on its own instead of hanging off the bottom of the viewport */
.tr-rail {
    top: 84px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--tr-line-2) transparent;
    padding-right: 2px;
}
.tr-rail::-webkit-scrollbar { width: 6px; }
.tr-rail::-webkit-scrollbar-thumb { background: var(--tr-line-2); border-radius: 3px; }
/* too short to be worth pinning: let it scroll with the page */
@media (max-height: 560px) {
    .tr-rail { position: static; max-height: none; overflow: visible; }
}
.tr-rail .side-card { border-radius: 14px; border-color: var(--tr-line-2); }

/* -------------------- Featured bundle -------------------- */
.tr-feature {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr);
    gap: 16px;
    margin-top: 26px;
}
.tr-feature-card {
    position: relative;
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 24px;
    padding: 26px;
    border: 1px solid rgba(233, 189, 98, 0.35);
    border-radius: 16px;
    background:
        radial-gradient(circle at 18% 40%, rgba(233, 189, 98, 0.18), transparent 45%),
        linear-gradient(120deg, #182543, #10172a);
    overflow: hidden;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.35);
}
.tr-feature-art {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 40px rgba(233, 189, 98, 0.18), inset 0 0 40px rgba(89, 111, 215, 0.2);
    align-self: center;
}
.tr-feature-art img { width: 100%; height: 100%; object-fit: cover; filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.7)); }
.tr-feature-body h2 {
    font-family: var(--font-heading);
    font-size: 30px;
    margin: 8px 0 8px;
    color: #fff9e7;
}
.tr-feature-body > p { color: var(--tr-muted); font-size: 13.5px; line-height: 1.6; margin: 0; }
.tr-feature-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 18px; }
.tr-feature-facts span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border: 1px solid var(--tr-line-2);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.18);
    color: #dce3f5;
    font-size: 12px;
}
.tr-feature-facts span[style] { border-color: color-mix(in srgb, var(--rank) 55%, transparent); }
.tr-feature-facts span[style] b { color: var(--rank); }
.tr-feature-facts .is-save { border-color: rgba(117, 216, 164, 0.4); color: #bff0d3; }
.tr-feature-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.tr-feature-price {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 700;
    color: var(--tr-gold-2);
    line-height: 1;
    margin-right: 6px;
}
.tr-feature-price s { display: block; font-size: 14px; color: var(--tr-muted); font-weight: 400; }
.tr-feature-price small { display: block; margin-top: 6px; font-family: var(--font-body); font-size: 11px; font-weight: 600; color: #75d8a4; letter-spacing: .02em; }
.tr-feature-side {
    padding: 24px;
    border: 1px solid var(--tr-line-2);
    border-radius: 16px;
    background: linear-gradient(135deg, #28223f, #11182a);
    display: flex;
    flex-direction: column;
}
.tr-feature-side p { color: #c7cce0; font-size: 13px; line-height: 1.65; margin: 10px 0 0; }
.tr-feature-side p b { color: var(--tr-gold-2); }
.tr-feature-side .tr-muted { color: var(--tr-muted); }
.tr-feature-side-cta { margin-top: auto; padding-top: 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }

/* -------------------- Rank ladder -------------------- */
.tr-ladder {
    display: grid;
    grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr));
    gap: 8px;
}
.tr-rung {
    --rank: var(--tr-gold);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 3px;
    padding: 14px 8px 12px;
    border: 1px solid var(--tr-line);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
    color: var(--tr-text);
    text-decoration: none;
    transition: transform .2s, border-color .2s, box-shadow .2s, background .2s;
}
.tr-rung:hover {
    transform: translateY(-4px);
    border-color: var(--rank);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35), 0 0 22px color-mix(in srgb, var(--rank) 25%, transparent);
    color: var(--tr-text);
}
.tr-rung .rank-badge { margin-bottom: 4px; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--rank) 40%, transparent)); }
.tr-rung b { font-family: var(--font-heading); font-size: 13px; color: var(--rank); letter-spacing: .03em; }
.tr-rung-cost { font-size: 11px; color: #f1eddf; font-weight: 600; }
.tr-rung small { color: var(--tr-muted); font-size: 10.5px; line-height: 1.35; margin-top: 3px; }

/* -------------------- Toolbar + shelves -------------------- */
.tr-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 20px; }
.tr-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tr-chip {
    padding: 9px 13px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--tr-muted);
    font-size: 12px;
    text-decoration: none;
    transition: color .2s, border-color .2s, background .2s;
}
.tr-chip:hover { color: var(--tr-gold-2); border-color: rgba(233, 189, 98, 0.5); }
.tr-chip.is-active { color: #17121b; background: var(--tr-gold); border-color: var(--tr-gold); font-weight: 700; }
.tr-search {
    margin-left: auto;
    width: 240px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    outline: 0;
}
.tr-search:focus { border-color: rgba(233, 189, 98, 0.6); }
.tr-treasury .signin-ribbon { margin-bottom: 20px; }
.tr-shelf + .tr-shelf { margin-top: 34px; }
.tr-shelf-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    font-family: var(--font-heading);
    font-size: 17px;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.tr-shelf-title a { color: #f3e7c4; text-decoration: none; }
.tr-shelf-title a:hover { color: var(--tr-gold-2); }
.tr-shelf-title span {
    font-family: var(--font-body);
    font-size: 11px;
    letter-spacing: 0;
    color: var(--tr-muted);
    border: 1px solid var(--tr-line-2);
    border-radius: 99px;
    padding: 2px 8px;
}
.tr-shelf-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--tr-line-2), transparent); }

/* -------------------- Product cards: rarity + ribbons -------------------- */
body.treasury .product { --r: var(--r-blue); border-radius: 15px; }
body.treasury .product.rarity-bronze { --r: var(--r-bronze); }
body.treasury .product.rarity-blue   { --r: var(--r-blue); }
body.treasury .product.rarity-purple { --r: var(--r-purple); }
body.treasury .product.rarity-gold   { --r: var(--r-gold); }
body.treasury .product.rarity-red    { --r: var(--r-red); }
body.treasury .product {
    border-color: color-mix(in srgb, var(--r) 26%, transparent);
    background:
        radial-gradient(circle at 50% 22%, color-mix(in srgb, var(--r) 16%, transparent), transparent 55%),
        linear-gradient(145deg, #151e34, #0e1528);
}
body.treasury .product::before {
    left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--r), transparent);
    opacity: .85;
}
body.treasury .product:hover {
    border-color: color-mix(in srgb, var(--r) 60%, transparent);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 30px color-mix(in srgb, var(--r) 22%, transparent);
}
body.treasury .product:hover::before { background: linear-gradient(90deg, transparent, var(--r), transparent); }

.tr-ribbon {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 3;
    padding: 5px 9px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #1c1620;
    background: var(--tr-gold);
    box-shadow: 0 0 14px rgba(233, 189, 98, 0.3);
}
.tr-ribbon-featured { background: linear-gradient(180deg, #fff0b1, #e9bd62); }
.tr-ribbon-popular  { background: linear-gradient(180deg, #ffe39a, #e0a43a); }
.tr-ribbon-rank     { background: rgba(109, 157, 255, 0.16); color: #cfdcff; border: 1px solid rgba(109, 157, 255, 0.55); box-shadow: none; }
.tr-ribbon-new      { background: rgba(181, 140, 255, 0.18); color: #e2d2ff; border: 1px solid rgba(181, 140, 255, 0.6); box-shadow: none; }
.tr-ribbon-limited  { background: rgba(239, 109, 115, 0.15); color: #ffc9cb; border: 1px solid rgba(239, 109, 115, 0.6); box-shadow: none; }
.tr-ribbon-sale     { background: linear-gradient(180deg, #ff8b8f, #d9474e); color: #fff; }
.tr-ribbon-sold     { background: #2a1416; color: #e8c26a; border: 1px solid rgba(232, 194, 106, 0.4); box-shadow: none; }
.tr-ribbon-direct   { background: #1f1530; color: #c79bff; border: 1px solid rgba(199, 155, 255, 0.45); box-shadow: none; }
.tr-ribbon-owned    { background: #2a2a2a; color: #aaa; box-shadow: none; }

.modal-rank {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 4px 0 10px;
    font-size: 13px;
    color: var(--tr-muted, #9ba8c0);
}
.modal-rank b { color: var(--rank, #e9bd62); }
.modal-rank a { color: #e9bd62; }

/* -------------------- Delivery -------------------- */
.tr-delivery {
    margin-top: 44px;
    padding: 24px 26px;
    border: 1px solid var(--tr-line-2);
    border-radius: 15px;
    background: linear-gradient(100deg, #121b31, #1b1c32);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.3);
}
.tr-delivery h3 { margin: 0 0 14px; font-family: var(--font-heading); font-size: 21px; color: #fff9e7; }
.tr-delivery ol {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
    counter-reset: step;
}
.tr-delivery li {
    counter-increment: step;
    position: relative;
    padding: 14px 14px 14px 52px;
    border: 1px solid var(--tr-line);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.15);
    color: var(--tr-muted);
    font-size: 12.5px;
    line-height: 1.55;
}
.tr-delivery li::before {
    content: counter(step);
    position: absolute;
    left: 14px; top: 14px;
    width: 26px; height: 26px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--tr-gold);
    color: #1a1420;
    font-weight: 900;
    font-size: 12px;
}
.tr-delivery li b { color: #f5f1e5; display: block; margin-bottom: 2px; }
.tr-delivery .tr-muted { font-size: 12.5px; margin: 0; }
.tr-delivery a { color: var(--tr-gold); }

/* ===================================================================
 * RANK BENEFITS (ranks.php)
 * =================================================================== */
.rb-hero { text-align: center; margin: 46px 0 26px; }
.rb-hero h1 {
    margin: 12px 0 14px;
    font-family: var(--font-heading);
    font-size: clamp(30px, 4vw, 54px);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #fff9e7;
    text-shadow: 0 0 24px rgba(233, 189, 98, 0.25);
}
.rb-hero p { max-width: 760px; margin: 0 auto; color: var(--tr-muted); line-height: 1.7; }
.tr-rule { height: 1px; max-width: 520px; margin: 22px auto 0; background: linear-gradient(90deg, transparent, var(--tr-gold), transparent); box-shadow: 0 0 18px rgba(233, 189, 98, 0.45); }

.rb-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.rb-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 6px;
    border: 1px solid var(--tr-line-2);
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.03);
    text-decoration: none;
    transition: border-color .2s, background .2s;
}
.rb-chip:hover { border-color: var(--rank); background: rgba(255, 255, 255, 0.06); }
.rb-chip b { display: block; color: var(--rank); font-family: var(--font-heading); font-size: 12.5px; line-height: 1.1; }
.rb-chip small { color: var(--tr-muted); font-size: 11px; }
.rb-more { text-align: center; color: var(--tr-muted); font-size: 13px; margin: 14px 0 0; }
.rb-more b { color: var(--tr-gold-2); }

.rb-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin: 28px 0 12px; font-size: 12.5px; }
.rb-toolbar code { color: var(--tr-gold-2); }
.rb-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.rb-filters .tr-chip { cursor: pointer; font: inherit; font-size: 12px; }
.rb-toolbar .tr-btn { min-height: 38px; font-size: 12px; }

.rb-table-shell {
    overflow: auto;
    border: 1px solid rgba(233, 189, 98, 0.28);
    border-radius: 14px;
    background: rgba(9, 14, 30, 0.88);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}
.rb-table { width: 100%; min-width: 980px; border-collapse: separate; border-spacing: 0; }
.rb-table th, .rb-table td { border-right: 1px solid var(--tr-line); border-bottom: 1px solid var(--tr-line); }
.rb-table tr > *:last-child { border-right: 0; }
.rb-table thead th {
    position: relative;
    padding: 16px 8px 18px;
    vertical-align: bottom;
    background: linear-gradient(180deg, rgba(37, 58, 106, 0.45), rgba(13, 20, 38, 0.95));
}
.rb-table .rb-feature, .rb-table tbody td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #0d1426;
    text-align: left;
}
.rb-table .rb-feature {
    width: 230px;
    min-width: 200px;
    padding-left: 20px;
    vertical-align: middle;
    color: var(--tr-gold);
    font: 700 18px var(--font-heading);
    letter-spacing: .08em;
    text-transform: uppercase;
    z-index: 3;
}
.rb-rank { text-align: center; min-width: 92px; }
.rb-rank::after {
    content: "";
    position: absolute;
    bottom: 0; left: 18%; right: 18%;
    height: 3px;
    background: var(--rank);
    box-shadow: 0 0 14px var(--rank);
}
.rb-rank .rank-badge { display: block; margin: 0 auto 8px; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--rank) 50%, transparent)); }
.rb-rank-name { display: block; color: var(--rank); font: 700 14px var(--font-heading); white-space: nowrap; }
.rb-rank-tier { display: block; margin-top: 4px; color: var(--tr-muted); font-size: 11px; }
.rb-table tbody td { padding: 11px 8px; text-align: center; font-size: 13px; font-weight: 600; }
.rb-table tbody td:first-child { padding-left: 20px; color: #d8e0ee; font-weight: 500; min-width: 200px; }
.rb-table tbody td:first-child small { display: block; color: #6f7c96; font-size: 11px; font-weight: 400; margin-top: 2px; }
.rb-table tbody tr:hover td { background: rgba(37, 58, 106, 0.22); }
.rb-table tbody tr:hover td:first-child { background: #121b33; }
.rb-val { color: var(--rank); }
.rb-yes { color: var(--rank); font-size: 17px; }
.rb-no { color: #3d4860; }
.rb-unique td:first-child { color: #f3d98a; }
.rb-group td {
    padding: 12px 20px 8px !important;
    text-align: left !important;
    background: rgba(233, 189, 98, 0.06) !important;
    color: var(--tr-gold) !important;
    font: 700 11px var(--font-body) !important;
    letter-spacing: .2em;
    text-transform: uppercase;
}
.rb-group td { position: static !important; }
.rb-group td span { position: sticky; left: 20px; }
.rb-group td small { color: var(--tr-muted); letter-spacing: .05em; text-transform: none; font-weight: 500; margin-left: 6px; }

.rb-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.rb-card {
    border: 1px solid color-mix(in srgb, var(--rank) 30%, transparent);
    border-top: 3px solid var(--rank);
    border-radius: 14px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--rank) 7%, #11182b), #0d1426);
    padding: 18px 18px 14px;
    scroll-margin-top: 90px;
}
.rb-card:target { box-shadow: 0 0 0 1px var(--rank), 0 0 40px color-mix(in srgb, var(--rank) 30%, transparent); }
.rb-card header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rb-card h3 { margin: 0; font-family: var(--font-heading); font-size: 19px; color: var(--rank); }
.rb-card header span { color: var(--tr-muted); font-size: 12px; }
.rb-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.rb-card li { position: relative; padding-left: 16px; color: #d4dbea; font-size: 13px; line-height: 1.5; }
.rb-card li::before { content: "✦"; position: absolute; left: 0; color: var(--rank); font-size: 10px; top: 3px; }
.rb-card li.is-unique { color: #f6dc8c; font-weight: 600; }
.rb-card li.is-season { color: #dcb6ff; }

.rb-homes { margin-top: 34px; }
.rb-homes .tr-section-head p a { color: var(--tr-gold); }
.rb-home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.rb-home {
    display: flex; flex-direction: column; overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--rank) 30%, transparent);
    border-top: 3px solid var(--rank);
    border-radius: 14px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--rank) 7%, #11182b), #0d1426);
}
.rb-home img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid var(--tr-line); }
.rb-home-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.rb-home h3 { margin: 0; font-family: var(--font-heading); font-size: 18px; color: var(--rank); }
.rb-home header span { color: var(--tr-muted); font-size: 12px; }
.rb-home header code { color: var(--tr-gold-2); background: rgba(0, 0, 0, 0.3); padding: 1px 5px; border-radius: 4px; }
.rb-home p { margin: 0; color: #d4dbea; font-size: 13px; line-height: 1.5; }
.rb-home dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rb-home dl div { padding: 7px 9px; border: 1px solid var(--tr-line); border-radius: 8px; background: rgba(0, 0, 0, 0.18); }
.rb-home dt { color: var(--tr-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.rb-home dd { margin: 2px 0 0; color: #f5f1e5; font-size: 13px; font-weight: 600; }

.rb-portals {
    display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0; margin-top: 14px; overflow: hidden;
    border: 1px solid var(--tr-line-2); border-radius: 14px; background: linear-gradient(180deg, #141c31, #0d1426);
}
.rb-portals img { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9; }
.rb-portals-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.rb-portals h3 { margin: 0; font-family: var(--font-heading); font-size: 20px; color: var(--tr-gold); }
.rb-portals p { margin: 0; color: #d4dbea; font-size: 13.5px; line-height: 1.6; }
.rb-portals p b { color: #f5f1e5; }
.rb-portals ul { margin: 4px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rb-portals li { display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; border: 1px solid var(--tr-line); border-left: 3px solid var(--rank); border-radius: 8px; background: rgba(0, 0, 0, 0.18); font-size: 13px; color: #d4dbea; }
.rb-portals li b { color: var(--rank); }
@media (max-width: 860px) { .rb-portals { grid-template-columns: 1fr; } }

.rb-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 34px; }
.rb-note { padding: 16px 18px; border: 1px solid var(--tr-line); border-radius: 12px; background: rgba(255, 255, 255, 0.025); color: var(--tr-muted); font-size: 13px; line-height: 1.6; }
.rb-note b { display: block; color: #f5f1e5; margin-bottom: 4px; }
.rb-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }

/* -------------------- Responsive -------------------- */
@media (max-width: 1100px) {
    .tr-feature { grid-template-columns: 1fr; }
}
@media (max-width: 1240px) {
    .tr-ladder { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
}
@media (max-width: 980px) {
    .tr-hero { grid-template-columns: minmax(0, 1fr); padding: 34px 28px; }
    .tr-showcase { max-width: 420px; width: 100%; }
    .tr-layout { grid-template-columns: 1fr; }
    .tr-rail { position: static; display: grid; grid-template-columns: 1fr 1fr; max-height: none; overflow: visible; }
    .rb-notes { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .tr-page { padding: 0 16px 60px; }
    .tr-hero { margin-top: 18px; padding: 28px 18px; border-radius: 16px; }
    .tr-hero h1 { font-size: 30px; }
    .tr-showcase { max-width: none; }
    .tr-trust { grid-template-columns: 1fr; }
    .tr-feature-card { grid-template-columns: 1fr; padding: 22px 18px; }
    .tr-feature-art { width: 160px; margin: 0 auto; }
    .tr-delivery ol { grid-template-columns: 1fr; }
    .tr-search { margin-left: 0; width: 100%; min-width: 0; }
    .tr-rail { grid-template-columns: 1fr; }
    .tr-section-head { flex-direction: column; align-items: flex-start; }
    .tr-ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rb-table .rb-feature { width: 128px; min-width: 128px; padding-left: 12px; font-size: 13px; }
    .rb-table tbody td:first-child { min-width: 128px; max-width: 128px; padding-left: 12px; font-size: 12px; }
    .rb-table tbody td:first-child small { display: none; }
}

/* -------------------- Slim cards + the "More info" modal (owner, 2026-11-01: "far too much text") -------------------- */
body.treasury .product-summary {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(2 * 1.5em);
    line-height: 1.5;
    margin-bottom: 14px;
}

.pm .pm-card {
    max-width: 520px;
    padding: 26px 26px 22px;
    text-align: left;
    background: linear-gradient(180deg, #151d33, #0d1426);
    border: 1px solid var(--tr-line-2);
    border-radius: 16px;
}
.pm .pm-card:has(.box-loot) { max-width: 640px; }
.pm-head { display: flex; align-items: center; gap: 16px; padding-right: 30px; }
.pm-art {
    flex: none;
    width: 72px;
    height: 72px;
    border-radius: 12px;
    background: radial-gradient(circle at 50% 60%, rgba(233, 189, 98, 0.22), transparent 70%), rgba(255, 255, 255, 0.03);
    border: 1px solid var(--tr-line);
    padding: 6px;
}
.pm-head .tr-eyebrow { font-size: 10px; letter-spacing: .22em; }
.pm .pm-card h3 {
    margin: 4px 0 0;
    font-size: 22px;
    letter-spacing: .04em;
    text-transform: none;
    color: var(--tr-text);
}
.pm-tagline { margin: 16px 0 0; color: var(--tr-muted); font-size: 14px; line-height: 1.55; }
.pm-facts { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 10px; font-size: 12px; color: var(--tr-muted); }
.pm-rank { display: inline-flex; align-items: center; gap: 6px; color: var(--tr-muted); text-decoration: none; }
.pm-rank b { color: var(--rank, var(--tr-gold)); }
.pm-rank:hover { color: var(--tr-gold); }
.pm-lead { margin: 14px 0 0; font-size: 13.5px; line-height: 1.6; color: #cfd6e4; }
.pm-lead b, .pm-more b { color: var(--tr-gold); }

.pm-chips {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}
.pm-chips li {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 9px 11px;
    border: 1px solid var(--tr-line);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.03);
    font-size: 13px;
    color: var(--tr-text);
}
.pm-chips li::before { content: '✦'; flex: none; color: var(--tr-gold); font-size: 11px; }

.pm .modal-gallery { margin-top: 14px; }
/* the page sits in its own stacking layer, so an open modal would slide under the sticky site bar - drop the bar while one is open */
body.treasury:has(.modal:not([hidden])) .topbar { z-index: 0; }

.pm-more { margin-top: 14px; border-top: 1px solid var(--tr-line); padding-top: 10px; font-size: 13px; line-height: 1.6; color: #cfd6e4; }
.pm-more summary { cursor: pointer; color: var(--tr-gold); font-size: 12px; font-weight: 700; letter-spacing: .06em; list-style: none; }
.pm-more summary::-webkit-details-marker { display: none; }
.pm-more summary::after { content: ' ▾'; }
.pm-more[open] summary::after { content: ' ▴'; }
.pm-more[open] summary { margin-bottom: 10px; }
.pm-more p { margin: 0 0 10px; }
.pm-list { columns: 2; column-gap: 18px; margin: 0 0 6px; padding: 0; list-style: none; font-size: 12.5px; }
.pm-list li { break-inside: avoid; padding: 2px 0; color: var(--tr-muted); }
.pm-list b { color: var(--tr-text); font-weight: 600; }
.pm-list li > a, .pm-list li > span { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 2px 6px; margin: 0 -6px; border-radius: 7px; }
.pm-list li > a { color: var(--tr-text); text-decoration: none; }
.pm-list li > a:hover { background: rgba(233, 189, 98, 0.08); color: var(--tr-gold-2, #ffe39a); }
.pm-list li > a::after { content: '↗'; margin-left: auto; font-size: 11px; color: var(--tr-muted); opacity: 0; transition: opacity .15s; }
.pm-list li > a:hover::after { opacity: 1; }
.pm-list img { flex: none; width: 24px; height: 24px; object-fit: contain; image-rendering: auto; }
.pm-hint { margin: 6px 0 0; font-size: 11px; color: var(--tr-muted); }
.pm-wiki { color: var(--tr-gold); text-decoration: none; }
.pm-wiki:hover { color: var(--tr-gold-2, #ffe39a); }
.pm-more .box-loot { margin-top: 0; }

.pm-foot {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--tr-line);
}
.pm-price { flex: none; font-family: var(--font-heading); font-size: 24px; font-weight: 700; color: var(--tr-text); line-height: 1.1; }
.pm-price s { display: block; font-size: 12px; color: var(--tr-muted); font-weight: 400; }
.pm-price small { display: block; margin-top: 3px; font-family: var(--font-body); font-size: 11px; font-weight: 600; color: #8fd6a4; }
.pm-buy { flex: 1; min-height: 48px; font-size: 14px; }

@media (max-width: 600px) {
    .pm .pm-card { padding: 22px 16px 18px; }
    .pm-art { width: 58px; height: 58px; }
    .pm .pm-card h3 { font-size: 19px; }
    .pm-chips li { padding: 8px 9px; font-size: 12px; }
    .pm-list { columns: 1; }
    .pm-foot { flex-direction: column; align-items: stretch; }
}
