/* =====================================================================
   Mystic Forest — Ranking Hub (epic redesign)
   Namespaced .rh-* so it never collides with the profile (.pf-*) styles.
   Reuses only .rk-doll (3D engine) + .rk-search/.rk-suggest (search JS).
   3D stage keeps the locked in-game gradient (#22202E > #15141F > #09090D).
   ===================================================================== */

.rh {
    --rh-gold: #d8b775;
    --rh-gold-bright: #f4dda2;
    --rh-gold-deep: #9c7c40;
    --rh-ink: #05060b;
    --rh-panel: rgba(12, 14, 24, 0.72);
    --rh-panel-2: rgba(16, 18, 30, 0.9);
    --rh-line: rgba(216, 183, 117, 0.22);
    --rh-line-soft: rgba(160, 150, 210, 0.14);
    --rh-text: #eef1fa;
    --rh-mut: #97a1bb;
    --rh-stage: linear-gradient(180deg, #22202e 0%, #15141f 55%, #09090d 100%);
    --rh-gold-1: #f4dda2;
    --rh-silver: #cdd6e6;
    --rh-bronze: #d08a52;
    position: relative;
    width: min(1220px, calc(100% - 2rem));
    margin: 1.4rem auto 4.5rem;
    color: var(--rh-text);
}

/* ---------- shared icon/vocation fills (self-contained) ---------- */
.rh .rk-ico { fill: currentColor; }
.rh .rk-wico { fill: currentColor; }
.rh .rk-voc { display: inline-flex; color: #d8c48a; }
.rh .rk-voc svg { fill: currentColor; }
.rh .rk-voc img,
.rh .rk-wico {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
}

/* ---------- ambient background ---------- */
.rh-aura {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}
.rh-aura::before,
.rh-aura::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
}
.rh-aura::before {
    width: 60vw;
    height: 60vw;
    top: -18vw;
    inset-inline-start: -10vw;
    background: radial-gradient(circle, rgba(196, 156, 82, 0.18), transparent 62%);
    animation: rh-drift 22s ease-in-out infinite alternate;
}
.rh-aura::after {
    width: 52vw;
    height: 52vw;
    bottom: -20vw;
    inset-inline-end: -12vw;
    background: radial-gradient(circle, rgba(120, 96, 200, 0.16), transparent 60%);
    animation: rh-drift 28s ease-in-out infinite alternate-reverse;
}
@keyframes rh-drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(4%, 6%, 0) scale(1.12); }
}

/* ---------- hero ---------- */
.rh-hero {
    position: relative;
    text-align: center;
    padding: 2.6rem 1rem 1.7rem;
    margin-bottom: 1.4rem;
    overflow: hidden;
    border: 1px solid var(--rh-line);
    border-radius: 16px;
    background:
        radial-gradient(120% 130% at 50% -20%, rgba(216, 183, 117, 0.14), transparent 55%),
        linear-gradient(180deg, rgba(20, 18, 30, 0.86), rgba(6, 7, 13, 0.92));
    box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.rh-hero__ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 640px;
    height: 640px;
    transform: translate(-50%, -60%);
    pointer-events: none;
    opacity: 0.35;
    background:
        conic-gradient(from 0deg, transparent 0 78%, rgba(216, 183, 117, 0.5) 86%, transparent 92%);
    border-radius: 50%;
    mask: radial-gradient(circle, transparent 60%, #000 61%);
    -webkit-mask: radial-gradient(circle, transparent 60%, #000 61%);
    animation: rh-spin 26s linear infinite;
}
@keyframes rh-spin { to { transform: translate(-50%, -60%) rotate(360deg); } }

.rh-hero__badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.32rem 0.9rem;
    margin-bottom: 0.9rem;
    border: 1px solid var(--rh-line);
    border-radius: 999px;
    background: rgba(8, 8, 14, 0.6);
    color: var(--rh-gold);
    font-size: 0.66rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}
.rh-hero__badge svg { width: 14px; height: 14px; fill: currentColor; }
.rh-hero__badge::before {
    content: "";
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #58e6a6;
    box-shadow: 0 0 10px #58e6a6;
    animation: rh-pulse 1.6s ease-in-out infinite;
}
@keyframes rh-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }

.rh-hero__title {
    position: relative;
    margin: 0;
    font-family: Cinzel, "Libre Baskerville", Georgia, serif;
    font-size: clamp(2.3rem, 5.6vw, 3.9rem);
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    background: linear-gradient(180deg, #fff 0%, var(--rh-gold-bright) 45%, var(--rh-gold-deep) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 40px rgba(216, 183, 117, 0.25);
}
.rh-hero__sub {
    position: relative;
    margin: 0.7rem auto 0;
    max-width: 640px;
    color: var(--rh-mut);
    font-size: 0.98rem;
}
.rh-hero__rule {
    position: relative;
    width: 120px;
    height: 2px;
    margin: 1rem auto 0;
    background: linear-gradient(90deg, transparent, var(--rh-gold), transparent);
    box-shadow: 0 0 18px var(--rh-gold);
}

/* ---------- section tabs ---------- */
.rh-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.6rem;
    margin-bottom: 1rem;
}
.rh-tab {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.6rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(18, 20, 32, 0.9), rgba(9, 10, 18, 0.9));
    color: #c3ccdf;
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.rh-tab::after {
    content: "";
    position: absolute;
    left: 15%;
    right: 15%;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--rh-gold), transparent);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.rh-tab__ico {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--rh-line);
    background: rgba(8, 9, 16, 0.7);
    color: var(--rh-gold);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.rh-tab__ico svg { width: 22px; height: 22px; fill: currentColor; }
.rh-tab__label {
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-align: center;
}
.rh-tab:hover {
    transform: translateY(-3px);
    border-color: var(--rh-line);
    color: #fff;
    box-shadow: 0 18px 40px -26px rgba(216, 183, 117, 0.7);
}
.rh-tab:hover .rh-tab__ico { transform: translateY(-2px) scale(1.05); }
.rh-tab.is-on {
    border-color: var(--rh-gold);
    color: #fff7e6;
    background:
        radial-gradient(120% 120% at 50% 0%, rgba(216, 183, 117, 0.2), transparent 60%),
        linear-gradient(180deg, rgba(24, 22, 30, 0.95), rgba(10, 10, 16, 0.95));
    box-shadow: 0 20px 46px -26px rgba(216, 183, 117, 0.8);
}
.rh-tab.is-on::after { opacity: 1; }
.rh-tab.is-on .rh-tab__ico {
    color: var(--rh-ink);
    background: linear-gradient(180deg, var(--rh-gold-bright), var(--rh-gold-deep));
    box-shadow: 0 0 22px rgba(216, 183, 117, 0.5);
}

/* ---------- sub filters ---------- */
.rh-subs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1rem;
}
.rh-subs--grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}
.rh-sub {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(12, 14, 22, 0.8);
    color: #b7c0d5;
    text-decoration: none;
    font-size: 0.8rem;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.rh-subs--grid .rh-sub {
    border-radius: 10px;
    justify-content: flex-start;
}
.rh-sub svg { width: 16px; height: 16px; fill: currentColor; flex: 0 0 auto; }
.rh-sub:hover { border-color: var(--rh-line); color: #fff; }
.rh-sub.is-on {
    border-color: var(--rh-gold);
    color: #fff7e6;
    background: rgba(216, 183, 117, 0.14);
}

/* ---------- search directory ---------- */
.rh-find {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr);
    gap: 1.1rem;
    align-items: center;
    padding: 0.35rem 0 1.1rem;
    margin-bottom: 0;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0;
    background: transparent;
}
.rh-find__kicker {
    margin: 0 0 0.25rem;
    color: var(--rh-gold);
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.rh-find h2 { margin: 0; font-family: Cinzel, Georgia, serif; font-size: 1.3rem; }
.rh-find p { margin: 0.3rem 0 0; color: var(--rh-mut); font-size: 0.9rem; }

.rh .rk-search { position: relative; }
.rh .rk-search input {
    width: 100%;
    height: 50px;
    padding: 0 1rem 0 2.8rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: #090a12;
    color: var(--rh-text);
    font: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
html[dir="rtl"] .rh .rk-search input { padding: 0 2.8rem 0 1rem; }
.rh .rk-search input:focus {
    outline: none;
    border-color: var(--rh-gold);
    box-shadow: 0 0 0 3px rgba(216, 183, 117, 0.14);
}
.rh .rk-search__ico {
    position: absolute;
    inset-inline-start: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--rh-gold);
    pointer-events: none;
}
.rh .rk-search__ico svg { width: 18px; height: 18px; fill: none; }
.rh .rk-suggest {
    position: absolute;
    inset-inline: 0;
    top: calc(100% + 6px);
    z-index: 30;
    border: 1px solid var(--rh-line);
    border-radius: 10px;
    background: #0b0d16;
    overflow: hidden;
    box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.9);
}
.rh .rk-suggest__row,
.rh .rk-suggest__empty {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.7rem 0.9rem;
    color: var(--rh-text);
    text-decoration: none;
}
.rh .rk-suggest__row:hover { background: rgba(216, 183, 117, 0.1); }
.rh .rk-suggest__row span,
.rh .rk-suggest__empty { color: var(--rh-mut); font-size: 0.8rem; }

/* ---------- champions podium ---------- */
.rh-crown {
    position: relative;
    margin: 0.4rem 0 1.5rem;
    padding: 1.8rem 1.2rem 0.4rem;
    overflow: hidden;
    border: none;
    border-radius: 0;
    background: #000;
}
.rh-crown__engine {
    position: absolute;
    top: 12px;
    inset-inline-end: 14px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--rh-gold);
    font-size: 0.56rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    pointer-events: none;
}
.rh-crown__engine svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.rh-crown__head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--rh-gold);
    font-family: Cinzel, Georgia, serif;
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}
.rh-crown__head svg { width: 18px; height: 18px; fill: currentColor; }

.rh-podium {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-areas: "p2 p1 p3";
    align-items: end;
    gap: 0;
}
.rh-podium--1 { grid-template-columns: 1fr; grid-template-areas: "p1"; max-width: 420px; margin: 0 auto; }
.rh-podium--2 { grid-template-columns: 1fr 1fr; grid-template-areas: "p2 p1"; }

.rh-col {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.rh-col--1 { grid-area: p1; --rh-accent: var(--rh-gold-1); --rh-accent-rgb: 244, 221, 162; }
.rh-col--2 { grid-area: p2; --rh-accent: var(--rh-silver); --rh-accent-rgb: 205, 214, 230; }
.rh-col--3 { grid-area: p3; --rh-accent: var(--rh-bronze); --rh-accent-rgb: 208, 138, 82; }

.rh-stage {
    position: relative;
    display: block;
    height: 420px;
    border-radius: 0;
    overflow: hidden;
    background: transparent;
    border: none;
    box-shadow: none;
    text-decoration: none;
}
.rh-col--1 .rh-stage { height: 420px; }
.rh-stage::before { display: none; }
.rh-stage .rk-doll {
    position: absolute;
    inset: 0;
    height: 100%;
    background: transparent;
    border-radius: 0;
    z-index: 1;
}
.rh-stage .rk-doll canvas { width: 100% !important; height: 100% !important; }
.rh-stage .rk-doll__load {
    position: absolute;
    inset: auto 0 0.7rem;
    text-align: center;
    color: var(--rh-mut);
    font-size: 0.76rem;
    pointer-events: none;
}

.rh-medal {
    position: absolute;
    top: 0.7rem;
    inset-inline-start: 0.7rem;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(var(--rh-accent-rgb), 0.7);
    background: rgba(8, 8, 13, 0.72);
    color: var(--rh-accent);
    font-family: Cinzel, Georgia, serif;
    font-weight: 700;
    font-size: 0.86rem;
    box-shadow: 0 0 18px rgba(var(--rh-accent-rgb), 0.3);
}
.rh-medal svg { width: 16px; height: 16px; fill: currentColor; }

.rh-dust {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}
.rh-dust i {
    position: absolute;
    bottom: -6px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(var(--rh-accent-rgb), 0.9);
    opacity: 0;
    animation: rh-rise linear infinite;
}
@keyframes rh-rise {
    0% { transform: translateY(0) scale(0.6); opacity: 0; }
    20% { opacity: 0.9; }
    100% { transform: translateY(-320px) scale(1); opacity: 0; }
}

.rh-plate {
    position: relative;
    z-index: 3;
    padding: 0.35rem 0.4rem 1rem;
    text-align: center;
    border: none;
    border-radius: 0;
    background: transparent;
}
.rh-plate__tier {
    margin: 0 0 0.25rem;
    color: var(--rh-accent);
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.rh-plate__who {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.rh-plate__who .rk-voc svg,
.rh-plate__who .rk-voc img { width: 18px; height: 18px; }
.rh-plate__name {
    margin: 0;
    font-family: Cinzel, Georgia, serif;
    font-size: 1.12rem;
    font-weight: 700;
}
.rh-plate__name a { color: #fdf6e6; text-decoration: none; }
.rh-plate__name a:hover { color: var(--rh-accent); }
.rh-plate__val {
    margin: 0.3rem 0 0;
    color: #8fe6cf;
    font-weight: 700;
    font-size: 0.92rem;
}
.rh-plate__val small { color: var(--rh-mut); font-weight: 400; font-size: 0.72rem; }

/* ---------- leaderboard ---------- */
.rh-board {
    position: relative;
    border-top: 2px solid transparent;
    border-image: linear-gradient(90deg, transparent, var(--rh-gold), transparent) 1;
    padding-top: 1rem;
}
.rh-board__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.7rem;
    padding: 0 0.4rem;
    color: var(--rh-gold);
    font-family: Cinzel, Georgia, serif;
    font-size: 0.8rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.rh-board__head span { display: inline-flex; align-items: center; gap: 0.45rem; }
.rh-board__head svg { width: 16px; height: 16px; fill: currentColor; }

.rh-list { display: flex; flex-direction: column; gap: 0.5rem; }

.rh-row {
    position: relative;
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr) minmax(150px, 260px);
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 1rem 0.7rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(14, 16, 26, 0.72), rgba(8, 9, 16, 0.72));
    overflow: hidden;
    opacity: 0;
    transform: translateY(14px);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.rh-row.is-in { opacity: 1; transform: none; }
.rh-row::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--rh-row-accent, transparent);
    opacity: 0.85;
}
.rh-row:hover {
    border-color: var(--rh-line);
    background: linear-gradient(180deg, rgba(20, 22, 34, 0.85), rgba(10, 11, 20, 0.85));
    box-shadow: 0 16px 40px -26px rgba(216, 183, 117, 0.7);
    transform: translateY(-2px);
}
.rh-row--top1 { --rh-row-accent: var(--rh-gold-1); border-color: rgba(244, 221, 162, 0.3); }
.rh-row--top2 { --rh-row-accent: var(--rh-silver); }
.rh-row--top3 { --rh-row-accent: var(--rh-bronze); }

.rh-row__rank {
    display: grid;
    place-items: center;
    justify-self: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(6, 7, 13, 0.8);
    color: var(--rh-mut);
    font-family: Cinzel, Georgia, serif;
    font-weight: 700;
    font-size: 1.05rem;
}
.rh-row--top1 .rh-row__rank { color: #0a0a10; background: linear-gradient(180deg, var(--rh-gold-bright), var(--rh-gold-deep)); border-color: var(--rh-gold); box-shadow: 0 0 18px rgba(244, 221, 162, 0.45); }
.rh-row--top2 .rh-row__rank { color: #0a0a10; background: linear-gradient(180deg, #eaf0fb, #98a4bd); border-color: #cdd6e6; }
.rh-row--top3 .rh-row__rank { color: #0a0a10; background: linear-gradient(180deg, #f0b184, #b9602f); border-color: var(--rh-bronze); }

.rh-row__tier {
    color: var(--rh-gold);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 700;
}
.rh-row__tier--legend { color: var(--rh-gold-bright); }
.rh-row__tier--hero { color: #d7dde8; }
.rh-row__who { min-width: 0; display: flex; align-items: center; gap: 0.55rem; }
.rh-row__id {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}
.rh-row__id .rk-voc svg,
.rh-row__id .rk-voc img { width: 18px; height: 18px; }
.rh-row__name {
    color: #f0f3fb;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rh-row__name:hover { color: var(--rh-gold-bright); }
.rh-row__helm { display: inline-flex; color: #aab3c6; }
.rh-row__helm svg { width: 15px; height: 15px; fill: currentColor; }
.rh-row__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.28rem;
    color: var(--rh-mut);
    font-size: 0.76rem;
}
.rh-tier {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.08rem 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #b7a983;
}
.rh-tier--legend { color: #f0d494; border-color: rgba(240, 212, 148, 0.4); }
.rh-tier--hero { color: #cdd6e6; border-color: rgba(205, 214, 230, 0.3); }
.rh-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #8a94ab;
}
.rh-chip svg { width: 13px; height: 13px; fill: currentColor; opacity: 0.8; }

.rh-row__val { justify-self: end; text-align: end; width: 100%; }
.rh-row__num {
    display: block;
    color: #8fe6cf;
    font-family: Cinzel, Georgia, serif;
    font-weight: 700;
    font-size: 1.08rem;
    font-variant-numeric: tabular-nums;
}
.rh-row__num small { color: var(--rh-mut); font-size: 0.66rem; font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; }
.rh-row__track {
    position: relative;
    height: 5px;
    margin-top: 0.4rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    overflow: hidden;
}
.rh-row__fill {
    position: absolute;
    inset: 0;
    inset-inline-end: auto;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--rh-gold-deep), var(--rh-gold-bright));
    transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}
.rh-row--top1 .rh-row__fill { background: linear-gradient(90deg, var(--rh-gold-deep), var(--rh-gold-1)); box-shadow: 0 0 10px rgba(244, 221, 162, 0.5); }

/* ---------- guild cards ---------- */
.rh-guilds {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 0.7rem;
}
.rh-guild {
    position: relative;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(14, 16, 26, 0.72), rgba(8, 9, 16, 0.72));
    overflow: hidden;
    opacity: 0;
    transform: translateY(14px);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.rh-guild.is-in { opacity: 1; transform: none; }
.rh-guild:hover {
    border-color: var(--rh-line);
    box-shadow: 0 16px 40px -26px rgba(216, 183, 117, 0.7);
    transform: translateY(-2px);
}
.rh-guild--top1 { border-color: rgba(244, 221, 162, 0.32); }
.rh-guild__crest {
    display: grid;
    place-items: center;
    width: 54px; height: 54px;
    border-radius: 14px;
    border: 1px solid var(--rh-line);
    background: radial-gradient(circle at 50% 30%, rgba(216, 183, 117, 0.2), rgba(8, 9, 16, 0.9));
    color: var(--rh-gold);
}
.rh-guild__crest svg { width: 26px; height: 26px; fill: currentColor; }
.rh-guild__rank {
    position: absolute;
    top: 0.5rem;
    inset-inline-end: 0.7rem;
    color: var(--rh-mut);
    font-family: Cinzel, Georgia, serif;
    font-size: 0.72rem;
}
.rh-guild__name {
    margin: 0;
    font-family: Cinzel, Georgia, serif;
    font-size: 1.06rem;
    color: #f0f3fb;
}
.rh-guild__name a { color: inherit; text-decoration: none; }
.rh-guild__name a:hover { color: var(--rh-gold-bright); }
.rh-guild__sub { margin: 0.25rem 0 0; color: var(--rh-mut); font-size: 0.78rem; display: flex; gap: 0.7rem; flex-wrap: wrap; }
.rh-guild__sub span { display: inline-flex; align-items: center; gap: 0.28rem; }
.rh-guild__sub svg { width: 13px; height: 13px; fill: currentColor; opacity: 0.85; }
.rh-guild__sub b { color: #cdd6e6; font-weight: 600; }
.rh-guild__stat { text-align: end; }
.rh-guild__lv {
    font-family: Cinzel, Georgia, serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--rh-gold-bright);
    line-height: 1;
}
.rh-guild__lv small { display: block; color: var(--rh-mut); font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; }

/* ---------- states ---------- */
.rh-empty {
    text-align: center;
    color: var(--rh-mut);
    padding: 3rem 1rem;
    border: 1px dashed var(--rh-line-soft);
    border-radius: 12px;
}
.rh-alert {
    padding: 1rem 1.2rem;
    border: 1px solid rgba(224, 96, 106, 0.5);
    border-radius: 10px;
    background: rgba(60, 16, 20, 0.4);
    color: #f2b9bf;
}

/* =====================================================================
   PLAYER DIRECTORY (characters.php)
   ===================================================================== */
.rh-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1rem;
    color: var(--rh-gold);
    text-decoration: none;
    font-size: 0.9rem;
}
.rh-back:hover { color: var(--rh-gold-bright); }

.rh-dir__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 1.2rem 0 0.7rem;
    padding: 0 0.4rem;
    color: var(--rh-gold);
    font-family: Cinzel, Georgia, serif;
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.rh-dir__head span { display: inline-flex; align-items: center; gap: 0.4rem; }
.rh-dir__head svg { width: 16px; height: 16px; fill: currentColor; }

/* =====================================================================
   PLAYER PROFILE (player.php)  &  GUILD PROFILE (guild.php)
   ===================================================================== */
.rh-pf {
    display: grid;
    grid-template-columns: 306px minmax(0, 1fr);
    gap: 0.85rem;
    align-items: start;
}
.rh-pf-side { display: flex; flex-direction: column; gap: 0.6rem; }

.rh-pf-card {
    position: relative;
    border: 1px solid var(--rh-line);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(16, 16, 26, 0.86), rgba(8, 9, 15, 0.9));
    padding: 0.9rem 1rem;
    overflow: hidden;
}
.rh-pf-fact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.rh-pf-fact__ico {
    display: grid;
    place-items: center;
    width: 40px; height: 40px;
    flex: 0 0 auto;
    border-radius: 11px;
    border: 1px solid var(--rh-line);
    background: rgba(8, 9, 16, 0.7);
    color: var(--rh-gold);
}
.rh-pf-fact__ico svg { width: 20px; height: 20px; fill: currentColor; }
.rh-pf-fact__ico .rk-ico--heart { color: #e35a6a; fill: #e35a6a; }
.rh-pf-fact__ico .rk-ico--mp { color: #5aa8e3; fill: #5aa8e3; }
.rh-pf-fact__body { min-width: 0; }
.rh-pf-fact span {
    display: block;
    color: var(--rh-mut);
    font-size: 0.64rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.rh-pf-fact b, .rh-pf-fact a {
    color: var(--rh-gold);
    font-weight: 600;
    text-decoration: none;
    word-break: break-word;
}
.rh-pf-fact a:hover { color: var(--rh-gold-bright); }

/* identity dossier — class portrait + compact facts */
.rh-pf-hero { padding: 0; }
.rh-pf-hero__art {
    position: relative;
    min-height: 188px;
    background:
        radial-gradient(80% 80% at 70% 20%, rgba(216, 183, 117, 0.16), transparent 55%),
        linear-gradient(180deg, #1a1624, #0a0a10);
}
.rh-pf-hero__pic {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 18%;
    display: block;
}
.rh-pf-hero__art::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 8, 14, 0.15) 20%, rgba(8, 8, 14, 0.92) 100%);
    pointer-events: none;
}
.rh-pf-hero__top,
.rh-pf-hero__id { position: relative; z-index: 1; }
.rh-pf-hero__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 0.75rem 0;
}
.rh-pf-hero__badge {
    display: grid;
    place-items: center;
    width: 46px; height: 46px;
    border-radius: 10px;
    border: 1px solid rgba(216, 183, 117, 0.4);
    background: rgba(8, 8, 12, 0.72);
    overflow: hidden;
}
.rh-pf-hero__badge img {
    width: 38px; height: 38px;
    object-fit: contain;
    display: block;
}
.rh-pf-hero__lv {
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(216, 183, 117, 0.35);
    background: rgba(8, 8, 12, 0.7);
    color: var(--rh-gold-bright);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    font-weight: 700;
}
.rh-pf-hero__id { padding: 2.2rem 0.9rem 0.8rem; }
.rh-pf-hero__title {
    margin: 0 0 0.15rem;
    color: #d8c8a0;
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.rh-pf-hero--facts { padding: 0.95rem 1rem 0.85rem; }
.rh-pf-hero--facts .rh-pf-hero__top { padding: 0; justify-content: flex-start; gap: 0.75rem; }
.rh-pf-hero--facts .rh-pf-hero__id { padding: 0; }
.rh-pf-hero--facts .rh-pf-hero__name { font-size: 1.35rem; text-shadow: none; }
.rh-pf-hero--facts .rh-pf-hero__jobs { margin: 0.55rem 0 0.85rem; }
.rh-pf-facts { margin: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.rh-pf-facts > div { margin: 0; }
.rh-pf-facts dt {
    display: flex; align-items: center; gap: 0.4rem;
    color: var(--rh-mut); font-size: 0.58rem; letter-spacing: 0.14em; text-transform: uppercase;
}
.rh-pf-facts dt svg { width: 13px; height: 13px; fill: currentColor; color: var(--rh-gold); }
.rh-pf-facts dd { margin: 0.2rem 0 0; color: #f3ead8; font-size: 0.88rem; font-weight: 600; }
.rh-pf-facts dd a { color: var(--rh-gold); text-decoration: none; }
.rh-pf-facts dd a:hover { color: var(--rh-gold-bright); }
.rh-pf-facts__split { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.rh-pf-map__meta em { display: block; margin-top: 0.15rem; color: #c8d0e0; font-style: normal; font-size: 0.72rem; }
.rh-pf-hero__name {
    margin: 0;
    font-family: Cinzel, Georgia, serif;
    font-size: 1.5rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.05;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}
.rh-pf-hero__jobs {
    margin: 0.35rem 0 0;
    color: var(--rh-gold);
    font-size: 0.78rem;
}
.rh-pf-hero__jobs b { color: #fff; font-weight: 700; }
.rh-pf-hero__jobs i { font-style: normal; margin: 0 0.3rem; color: #9aa3b8; }
.rh-pf-hero__meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-top: 1px solid var(--rh-line);
}
.rh-pf-hero__meta > div {
    padding: 0.7rem 0.8rem;
}
.rh-pf-hero__meta > div + div { border-inline-start: 1px solid var(--rh-line); }
.rh-pf-hero__meta span {
    display: block;
    color: var(--rh-mut);
    font-size: 0.58rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.15rem;
}
.rh-pf-hero__meta b, .rh-pf-hero__meta a {
    color: var(--rh-gold);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.78rem;
}
.rh-pf-hero__meta a:hover { color: var(--rh-gold-bright); }

.rh-pf-sheet { padding: 0.85rem 0.85rem 0.75rem; }
.rh-pf-hud { display: flex; flex-direction: column; gap: 0.45rem; }
.rh-pf-hud__row,
.rh-pf-attrs__row {
    display: grid;
    align-items: center;
    gap: 0.45rem;
}
.rh-pf-hud__row {
    grid-template-columns: 28px minmax(0, 1fr) auto;
}
.rh-pf-attrs__row {
    grid-template-columns: minmax(6.8rem, auto) minmax(0, 1fr) 3.4rem;
}
.rh-pf-hud__row span:first-child,
.rh-pf-attrs__row span:first-child {
    color: var(--rh-mut);
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    font-weight: 700;
}
.rh-pf-attrs__row span:first-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rh-pf-hud__row b,
.rh-pf-attrs__row b {
    color: #f2f5fc;
    font-variant-numeric: tabular-nums;
    font-size: 0.78rem;
    min-width: 2.2rem;
    text-align: end;
}
.rh-pf-hud__track {
    height: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
.rh-pf-hud__track i {
    display: block;
    height: 100%;
    border-radius: inherit;
}
.rh-pf-hud__row--hp .rh-pf-hud__track i { background: linear-gradient(90deg, #8a2a38, #e35a6a); }
.rh-pf-hud__row--mp .rh-pf-hud__track i { background: linear-gradient(90deg, #2a5a8a, #5aa8e3); }
.rh-pf-attrs {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.38rem;
}
.rh-pf-attrs__row .rh-pf-hud__track i { background: linear-gradient(90deg, #7a6230, #d8b775); }
.rh-pf-chips {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    margin-top: 0.85rem;
}
.rh-pf-chips > div {
    padding: 0.5rem 0.55rem;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(8, 9, 16, 0.45);
}
.rh-pf-chips span {
    display: block;
    color: var(--rh-mut);
    font-size: 0.56rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.rh-pf-chips b { color: var(--rh-gold); font-size: 0.8rem; }
.rh-pf-chips em {
    display: block;
    font-style: normal;
    color: #c8d0e0;
    font-size: 0.68rem;
}
.rh-pf-chips .is-vip { grid-column: 1 / -1; border-color: rgba(216, 183, 117, 0.35); }

.rh-pf-map { padding: 0; }
.rh-pf-map__meta { display: flex; align-items: center; gap: 0.7rem; padding: 0.85rem 1rem; }
.rh-pf-map__meta .rh-pf-fact__body { display: flex; flex-direction: column; gap: 0.12rem; min-width: 0; }
.rh-pf-map__meta b {
    display: block;
    color: #f3ead8;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}
.rh-pf-map__meta em {
    display: block;
    margin-top: 0;
    color: #c8d0e0;
    font-style: normal;
    font-size: 0.72rem;
    unicode-bidi: isolate;
}

/* real in-game parchment map, stitched from 12 game tiles (4 x 3), always LTR like the client */
.rh-pf-map__canvas {
    position: relative;
    height: auto;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #6f5432;
    direction: ltr;
    unicode-bidi: isolate;
}
.rh-pf-map__tiles {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 0;
    pointer-events: none;
    direction: ltr;
}
.rh-pf-map__tiles img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
}
/* soft vignette so the card edges read like an old drawn map */
.rh-pf-map__canvas::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 130% at 50% 40%, transparent 55%, rgba(30, 20, 8, 0.55) 100%);
    pointer-events: none;
    z-index: 1;
}
.rh-pf-map__pin {
    position: absolute;
    width: 12px; height: 12px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, #ffe9a8 0%, #d8b775 45%, #8a5a1e 100%);
    border: 1px solid #5a3a12;
    box-shadow: 0 0 10px rgba(216, 183, 117, 0.9), 0 2px 3px rgba(0, 0, 0, 0.5);
    z-index: 2;
}
.rh-pf-map__ping {
    position: absolute;
    inset: 50%;
    width: 12px; height: 12px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2px solid rgba(216, 183, 117, 0.8);
    animation: rh-ping 2.2s ease-out infinite;
}
@keyframes rh-ping {
    0% { width: 8px; height: 8px; opacity: 0.9; }
    100% { width: 60px; height: 60px; opacity: 0; }
}

/* main column */
.rh-pf-main { display: flex; flex-direction: column; gap: 0.7rem; }
.rh-pf-panel {
    border: 1px solid var(--rh-line);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(14, 14, 22, 0.8), rgba(7, 8, 13, 0.85));
    overflow: hidden;
}
.rh-pf-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.65rem 0.95rem;
    border-bottom: 1px solid var(--rh-line);
    color: #e9dfc6;
    font-family: Cinzel, Georgia, serif;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.rh-pf-bar > span { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.rh-pf-bar svg { width: 17px; height: 17px; fill: currentColor; color: var(--rh-gold); flex: 0 0 auto; }
.rh-pf-chev {
    display: grid;
    place-items: center;
    width: 30px; height: 30px;
    flex: 0 0 auto;
    border: 1px solid var(--rh-line);
    border-radius: 50%;
    background: rgba(10, 11, 18, 0.9);
    color: var(--rh-gold);
    cursor: pointer;
    transition: transform 0.25s ease, background 0.2s ease;
}
.rh-pf-chev svg { width: 16px; height: 16px; fill: currentColor; }
.rh-pf-chev[aria-expanded="false"] svg { transform: rotate(-90deg); }
.rh-pf-chev:hover { background: rgba(216, 183, 117, 0.16); }

.rh-pf-stage {
    position: relative;
    height: 620px;
    overflow: hidden;
    background: #1a120c;
}
.rh-pf-stage__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: #1a120c;
}
.rh-pf-stage__plate {
    position: absolute;
    inset: -8%;
}
.rh-pf-stage__plate img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 42% 48%;
    display: block;
}
.rh-pf-stage::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background:
        radial-gradient(72% 74% at 50% 46%, transparent 55%, rgba(12, 8, 6, 0.22) 100%),
        linear-gradient(180deg, rgba(20, 12, 8, 0.1), transparent 18%, transparent 82%, rgba(8, 6, 4, 0.18));
}
.rh-pf-stage .rk-doll {
    position: absolute;
    inset: 0;
    height: 100%;
    background: transparent;
    border-radius: 0;
    z-index: 1;
}
.rh-pf-stage .rk-doll canvas { width: 100% !important; height: 100% !important; }
.rh-pf-stage .rk-doll__load {
    position: absolute;
    inset: auto 0 1rem;
    text-align: center;
    color: var(--rh-mut);
    font-size: 0.78rem;
    pointer-events: none;
}

/* equipment slot rails */
.rh-eqs { position: absolute; z-index: 3; display: flex; gap: 0.55rem; pointer-events: none; }
.rh-eqs--top { top: 16px; left: 50%; transform: translateX(-50%); }
.rh-eqs--left { top: 88px; inset-inline-start: 14px; flex-direction: column; align-items: flex-start; }
.rh-eqs--right { top: 88px; inset-inline-end: 14px; flex-direction: column; align-items: flex-end; }
.rh-eqs__row { display: flex; gap: 0.55rem; flex: 0 0 auto; }

.rh-eq {
    pointer-events: auto;
    position: relative;
    display: block;
    box-sizing: border-box;
    width: 52px;
    height: 52px;
    min-width: 52px;
    min-height: 52px;
    flex: 0 0 52px;
    border: 2px solid #d8b775;
    border-radius: 6px;
    background: rgba(8, 8, 13, 0.88);
    overflow: hidden;
    isolation: isolate;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.rh-eq.is-on { border-color: #e8c96a; }
.rh-eq.is-on:hover {
    transform: translateY(-2px) scale(1.06);
    box-shadow: 0 0 16px color-mix(in srgb, var(--rare, #a020f0) 55%, transparent);
    z-index: 5;
}
.rh-eq img {
    position: absolute;
    inset: 4px;
    width: calc(100% - 8px);
    height: calc(100% - 8px);
    object-fit: contain;
    display: block;
}

.rh-pf-engine {
    position: absolute;
    top: 16px; inset-inline-end: 16px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.55rem;
    border: 1px solid var(--rh-line);
    border-radius: 999px;
    background: rgba(8, 8, 12, 0.7);
    color: var(--rh-gold);
    font-size: 0.6rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.rh-pf-engine svg { width: 13px; height: 13px; fill: currentColor; }

.rh-poses {
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.32rem 0.5rem;
    border: 1px solid var(--rh-line);
    border-radius: 12px;
    background: rgba(6, 6, 11, 0.78);
    backdrop-filter: blur(4px);
}
.rh-poses__arrow { color: var(--rh-mut); }
.rh-pose {
    display: grid;
    place-items: center;
    width: 42px; height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9px;
    background: rgba(18, 20, 30, 0.85);
    color: #8fd4ff;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.rh-pose:hover { transform: translateY(-2px); border-color: rgba(126, 224, 255, 0.5); }
.rh-pose.is-on { border-color: #7ee0ff; box-shadow: 0 0 14px rgba(126, 224, 255, 0.35); background: rgba(20, 34, 46, 0.9); }
.rh-pose svg { width: 22px; height: 22px; fill: currentColor; }
.rh-pose__img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    display: block;
    pointer-events: none;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}
.rh-pose.is-on .rh-pose__img { filter: drop-shadow(0 0 6px rgba(126, 224, 255, 0.6)); }

/* mastery panels */
.rh-mast { padding: 0.5rem 0.95rem 0.85rem; }
.rh-mast__head {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    color: var(--rh-gold);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--rh-line);
}
.rh-mast__row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.7rem;
    padding: 0.42rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.rh-mast__row.is-zero { opacity: 0.4; }
.rh-mast__name { display: flex; align-items: center; gap: 0.5rem; color: #d7deec; }
.rh-mast__name svg { width: 16px; height: 16px; fill: var(--rh-gold); flex: 0 0 auto; }
.rh-mast__name img { width: 20px; height: 20px; object-fit: contain; flex: 0 0 auto; }
.rh-mast__val { color: #8fe6cf; font-weight: 700; font-variant-numeric: tabular-nums; }

/* guild profile */
.rh-gp-head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.7rem 1.4rem;
    min-height: 220px;
    margin-bottom: 0.9rem;
    border: 1px solid var(--rh-line);
    border-radius: 14px;
    overflow: hidden;
    background: #0a0808;
}
.rh-gp-head__scene {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.rh-gp-head__scene img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 42%;
    filter: saturate(1.08) brightness(0.72);
    animation: rh-gp-hall 22s ease-in-out infinite;
}
.rh-gp-head__embers {
    position: absolute;
    inset: -40% 0;
    background-image:
        radial-gradient(circle, rgba(255, 170, 60, 0.55) 0 1px, transparent 2px),
        radial-gradient(circle, rgba(255, 90, 20, 0.4) 0 1.5px, transparent 3px);
    background-size: 42px 70px, 28px 52px;
    animation: rh-gp-embers 6s linear infinite;
    mix-blend-mode: screen;
    pointer-events: none;
    opacity: 0.55;
}
.rh-gp-head::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(6, 5, 6, 0.78) 0%, rgba(6, 5, 6, 0.42) 46%, rgba(6, 5, 6, 0.7) 100%),
        linear-gradient(180deg, rgba(8, 6, 6, 0.2), rgba(8, 6, 6, 0.55));
    pointer-events: none;
}
.rh-gp-head__id,
.rh-gp-stats { position: relative; z-index: 2; }
.rh-gp-head__id { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.rh-gp-crest {
    position: relative;
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    flex: 0 0 auto;
    border-radius: 50%;
    border: 1px solid rgba(244, 221, 162, 0.45);
    background: radial-gradient(circle at 50% 30%, rgba(40, 28, 16, 0.35), rgba(6, 5, 8, 0.92));
    box-shadow: 0 0 0 4px rgba(8, 6, 8, 0.55), 0 8px 22px rgba(0, 0, 0, 0.45);
}
.rh-gp-crest__mark {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.55));
}
@keyframes rh-gp-hall {
    0%, 100% { transform: scale(1.04) translateY(0); }
    50% { transform: scale(1.1) translateY(-2%); }
}
@keyframes rh-gp-embers {
    from { transform: translateY(-8%); }
    to { transform: translateY(18%); }
}
.rh-gp-head__kicker { margin: 0 0 0.1rem; color: var(--rh-gold); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7); }
.rh-gp-head h1 { margin: 0; font-family: Cinzel, Georgia, serif; font-size: 1.7rem; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.75); }
.rh-gp-head__leader { margin: 0.25rem 0 0; color: #d5c7b0; font-size: 0.85rem; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7); }
.rh-gp-head__leader a { color: var(--rh-gold); text-decoration: none; }
.rh-gp-stats { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.rh-gp-stat { text-align: center; min-width: 78px; }
.rh-gp-stat__ico {
    display: block;
    width: 36px;
    height: 36px;
    margin: 0 auto 0.28rem;
    object-fit: contain;
    image-rendering: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.55));
}
.rh-gp-stat b { display: block; font-family: Cinzel, Georgia, serif; font-size: 1.35rem; color: var(--rh-gold-bright); text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7); }
.rh-gp-stat span { color: #c9bba4; font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; }
.rh-gp-stat--gold b { color: #f6d56b; }
.rh-live {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-inline-start: 0.6rem;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    border: 1px solid rgba(111, 214, 170, 0.35);
    color: #8fe6cf;
    font-size: 0.58rem;
    letter-spacing: 0.14em;
}
.rh-live::before {
    content: "";
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #6fd6aa;
    box-shadow: 0 0 8px #6fd6aa;
    animation: rh-live-dot 1.4s ease-in-out infinite;
}
.rh-live.is-on { border-color: rgba(246, 213, 107, 0.55); color: #f6d56b; }
@keyframes rh-live-dot {
    0%, 100% { opacity: 0.45; transform: scale(0.85); }
    50% { opacity: 1; transform: scale(1.15); }
}
.rh-gp-vault {
    margin: 0 0 0.9rem;
    border: 1px solid var(--rh-line);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(18, 16, 26, 0.88), rgba(8, 8, 13, 0.92));
    overflow: hidden;
}
.rh-gp-vault__bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--rh-line-soft);
    color: var(--rh-gold);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.rh-gp-vault__bar small { color: var(--rh-mut); letter-spacing: 0.14em; }
.rh-gp-res {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0.85rem;
}
.rh-gp-res__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.32rem;
    min-height: 132px;
    padding: 0.7rem 0.4rem 0.65rem;
    border: 1px solid var(--rh-line-soft);
    border-radius: 10px;
    border-top: 2px solid rgba(180, 170, 150, 0.28);
    background: rgba(6, 7, 12, 0.55);
    text-align: center;
}
.rh-gp-res__ico {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}
.rh-gp-res__ico img {
    display: block;
    width: 64px;
    height: 64px;
    object-fit: contain;
    image-rendering: auto;
}
.rh-gp-res__card--gold,
.rh-gp-res__card.is-gold { border-top-color: #f0c75a; }
.rh-gp-res__card--ruby { border-top-color: #e35a6a; }
.rh-gp-res__card--ore { border-top-color: #d0a24a; }
.rh-gp-res__card--wood { border-top-color: #c47a38; }
.rh-gp-res__card--herb { border-top-color: #5fbe62; }
.rh-gp-res__card--rune { border-top-color: #5ec4ef; }
.rh-gp-res__card--stone { border-top-color: #c48a48; }
.rh-gp-res__card.is-gold {
    background: radial-gradient(80% 80% at 50% 0%, rgba(246, 213, 107, 0.14), rgba(6, 7, 12, 0.55));
}
.rh-gp-res__card b {
    color: #f3f6fb;
    font-family: Cinzel, Georgia, serif;
    font-variant-numeric: tabular-nums;
    font-size: 1.05rem;
    line-height: 1;
}
.rh-gp-res__card > span:last-child {
    color: var(--rh-mut);
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.rh-gp-meta { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 0 0 0.9rem; }
.rh-gp-note {
    flex: 1 1 240px;
    margin: 0;
    padding: 0.9rem 1.1rem;
    border: 1px solid var(--rh-line-soft);
    border-radius: 10px;
    background: rgba(8, 9, 15, 0.6);
    color: #c8d0e0;
    font-style: italic;
}
.rh-gp-war {
    padding: 0.9rem 1.1rem;
    border: 1px solid var(--rh-line-soft);
    border-radius: 10px;
    color: var(--rh-mut);
    font-size: 0.82rem;
}
.rh-gp-war b { color: var(--rh-gold-bright); }
.rh-lead {
    display: inline-flex;
    align-items: center;
    padding: 0.08rem 0.4rem;
    border-radius: 999px;
    border: 1px solid rgba(246, 213, 107, 0.35);
    color: #f6d56b;
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.rh-row.is-lead { border-color: rgba(246, 213, 107, 0.22); }

/* ---------- responsive ---------- */
@media (prefers-reduced-motion: reduce) {
    .rh-pf-stage__plate,
    .rh-gp-head__scene img,
    .rh-gp-head__embers,
    .rh-live::before { animation: none; }
}
@media (max-width: 1100px) {
    .rh-pf { grid-template-columns: 1fr; }
    .rh-pf-stage { height: 540px; }
}
@media (max-width: 960px) {
    .rh-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.4rem; }
    .rh-tab { padding: 0.7rem 0.3rem; }
    .rh-tab__label { font-size: 0.66rem; }
    .rh-tab__ico { width: 38px; height: 38px; }
    .rh-find { grid-template-columns: 1fr; }
    .rh-subs--grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
    .rh-nav { grid-template-columns: repeat(3, 1fr); }
    .rh-podium { grid-template-columns: 1fr; grid-template-areas: "p1" "p2" "p3"; max-width: 420px; margin: 0 auto; }
    .rh-col--1 .rh-stage, .rh-stage { height: 360px; }
    .rh-row { grid-template-columns: 48px minmax(0, 1fr); }
    .rh-row__val { grid-column: 1 / -1; justify-self: stretch; text-align: start; }
    .rh-row__num { font-size: 1rem; }
    .rh-subs--grid { grid-template-columns: repeat(2, 1fr); }
    .rh-guilds { grid-template-columns: 1fr; }
    .rh-pf-stage { height: 500px; }
    .rh-eq { width: 46px; height: 46px; }
    .rh-gp-stats { width: 100%; justify-content: space-around; }
    .rh-gp-res { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ============================================================
   Guild profile v2 — centered hero + roster/castle + 3D castle
   ============================================================ */
.rh-gp2-head {
    position: relative;
    text-align: center;
    padding: 2.4rem 1rem 2rem;
    margin-bottom: 1.6rem;
    border: 1px solid var(--rh-line);
    border-radius: 16px;
    background:
        radial-gradient(120% 100% at 50% -10%, rgba(216, 183, 117, 0.10), transparent 60%),
        linear-gradient(180deg, rgba(18, 20, 32, 0.92), rgba(9, 10, 18, 0.94));
    overflow: hidden;
}
.rh-gp2-head::before,
.rh-gp2-head::after {
    content: "";
    position: absolute; top: 12px; width: 26px; height: 26px;
    border: 2px solid var(--rh-line);
}
.rh-gp2-head::before { left: 12px; border-right: 0; border-bottom: 0; }
.rh-gp2-head::after { right: 12px; border-left: 0; border-bottom: 0; }
.rh-gp2-crest {
    display: inline-flex; align-items: center; justify-content: center;
    width: 54px; height: 54px; margin-bottom: 0.4rem;
    border-radius: 12px;
    border: 1px solid var(--rh-line);
    background: rgba(8, 9, 16, 0.7);
}
.rh-gp2-crest img { width: 32px; height: 32px; object-fit: contain; }
.rh-gp2-kicker {
    margin: 0; color: var(--rh-gold);
    font-size: 0.66rem; font-weight: 600; letter-spacing: 0.34em; text-transform: uppercase;
}
.rh-gp2-name {
    margin: 0.35rem 0 1.3rem;
    font-family: "Cormorant Garamond", Cinzel, Georgia, serif;
    font-size: clamp(2.6rem, 6vw, 4.4rem);
    font-weight: 700; line-height: 0.95; letter-spacing: 0.04em;
    background: linear-gradient(180deg, #fff 0%, var(--rh-gold-bright) 48%, var(--rh-gold-deep) 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: var(--rh-gold-bright);
}
.rh-gp2-facts {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem;
}
.rh-gp2-fact {
    display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
    min-width: 150px; padding: 0.75rem 1.1rem;
    border: 1px solid var(--rh-line-soft); border-radius: 12px;
    background: rgba(8, 9, 16, 0.55);
}
.rh-gp2-fact svg { width: 18px; height: 18px; fill: none; stroke: var(--rh-gold); stroke-width: 1.6; }
.rh-gp2-fact img { width: 22px; height: 22px; object-fit: contain; }
.rh-gp2-fact span {
    color: var(--rh-mut, #9aa8c2); font-size: 0.6rem;
    letter-spacing: 0.22em; text-transform: uppercase;
}
.rh-gp2-fact b { color: #fff; font-size: 1.02rem; font-weight: 700; }
.rh-gp2-fact b a { color: var(--rh-gold-bright); text-decoration: none; }
.rh-gp2-fact b a:hover { text-decoration: underline; }

.rh-gp2-grid {
    display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 1.2rem; margin-bottom: 1.6rem;
}
.rh-gp2-roster, .rh-gp2-castle {
    border: 1px solid var(--rh-line); border-radius: 14px;
    background: linear-gradient(180deg, rgba(16, 18, 28, 0.9), rgba(9, 10, 18, 0.92));
    overflow: hidden;
}
.rh-gp2-roster__bar, .rh-gp2-castle__bar {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1rem 1.2rem; border-bottom: 1px solid var(--rh-line-soft);
}
.rh-gp2-roster__kicker {
    margin: 0; color: var(--rh-gold); font-size: 0.58rem;
    letter-spacing: 0.26em; text-transform: uppercase;
}
.rh-gp2-roster__bar h2, .rh-gp2-castle__bar h2 {
    margin: 0.1rem 0 0; font-size: 1.1rem; color: #fff; font-weight: 700;
}
.rk-search--mini { min-width: 0; max-width: 200px; }

.rh-gp2-table { display: flex; flex-direction: column; }
.rh-gp2-tr {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 64px 84px 84px 110px;
    align-items: center; gap: 0.5rem;
    padding: 0.6rem 1.2rem; border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.84rem;
}
.rh-gp2-tr--head {
    color: var(--rh-mut, #9aa8c2); font-size: 0.6rem;
    letter-spacing: 0.16em; text-transform: uppercase;
}
.rh-gp2-tr:not(.rh-gp2-tr--head):hover { background: rgba(216, 183, 117, 0.06); }
.rh-gp2-tr.is-lead { background: rgba(216, 183, 117, 0.05); }
.rh-gp2-rank { color: var(--rh-gold); font-weight: 700; }
.rh-gp2-who { display: flex; align-items: center; gap: 0.3rem; min-width: 0; }
.rh-gp2-who .rk-voc img { width: 18px; height: 18px; }
.rh-gp2-who > a {
    color: #fff; text-decoration: none; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rh-gp2-who > a:hover { color: var(--rh-gold-bright); }
.rh-gp2-badge {
    display: inline-flex; align-items: center; gap: 0.2rem;
    padding: 0.05rem 0.4rem; border-radius: 999px;
    border: 1px solid rgba(246, 213, 107, 0.35); color: #f6d56b;
    font-size: 0.54rem; letter-spacing: 0.08em; text-transform: uppercase; font-style: normal;
}
.rh-gp2-badge svg { width: 11px; height: 11px; fill: currentColor; }
.rh-gp2-lv b { color: var(--rh-gold-bright); }
.rh-gp2-hp { color: #ff8a8a; }
.rh-gp2-mp { color: #8ab4ff; }
.rh-gp2-join { color: var(--rh-mut, #9aa8c2); font-size: 0.78rem; }

.rh-gp2-lvpill, .rh-gp2-castle__bar .rh-gp2-lvpill {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.3rem 0.7rem; border-radius: 999px;
    border: 1px solid var(--rh-line); background: rgba(8, 9, 16, 0.7);
    color: var(--rh-gold); font-size: 0.6rem; letter-spacing: 0.16em; text-transform: uppercase;
}
.rh-gp2-lvpill b { color: var(--rh-gold-bright); font-size: 0.9rem; }

/* 3D castle stage */
.rk-castle { display: flex; flex-direction: column; }
.rk-castle__stage {
    position: relative; height: 420px; width: 100%;
    background:
        radial-gradient(120% 90% at 50% 8%, #22202E 0%, #15141F 52%, #09090D 100%);
}
.rk-castle__stage canvas { display: block; width: 100% !important; height: 100% !important; }
.rk-castle__plate {
    position: absolute; left: 50%; top: 46%; transform: translate(-50%, -130%);
    z-index: 2; min-width: 180px; padding: 0.55rem 1.15rem;
    border-radius: 8px; text-align: center; pointer-events: none;
    background: rgba(8, 8, 12, 0.88);
    border: 1px solid rgba(216, 183, 117, 0.38);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.rk-castle__plate[hidden] { display: none; }
.rk-castle__plate strong {
    display: block; color: #f4ecd8; font-size: 0.92rem; font-weight: 600;
    letter-spacing: 0.01em;
}
.rk-castle__plate span {
    display: block; margin-top: 0.15rem; color: #d4c39a; font-size: 0.78rem;
}
.rk-castle__load {
    position: absolute; inset: 0; margin: auto; width: 34px; height: 34px;
    border: 3px solid rgba(216, 183, 117, 0.25); border-top-color: var(--rh-gold);
    border-radius: 50%; animation: rk-spin 0.9s linear infinite;
}
@keyframes rk-spin { to { transform: rotate(360deg); } }
.rk-castle.is-error .rk-castle__stage::after {
    content: "⚠"; position: absolute; inset: 0; display: grid; place-items: center;
    color: var(--rh-gold); font-size: 2rem; opacity: 0.5;
}
.rh-gp2-engine, .rh-gp2-drag {
    position: absolute; bottom: 10px; display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.25rem 0.6rem; border-radius: 999px;
    border: 1px solid var(--rh-line); background: rgba(6, 7, 12, 0.6);
    color: var(--rh-gold); font-size: 0.56rem; letter-spacing: 0.12em; text-transform: uppercase;
    pointer-events: none;
}
.rh-gp2-engine { right: 10px; }
.rh-gp2-engine svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.rh-gp2-drag { left: 10px; color: var(--rh-mut, #9aa8c2); }
.rk-castle__ui {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    padding: 0.9rem 1.2rem; border-top: 1px solid var(--rh-line-soft);
}
.rk-castle__field { display: flex; flex-direction: column; gap: 0.3rem; min-width: 220px; flex: 1; }
.rk-castle__field > span {
    color: var(--rh-mut, #9aa8c2); font-size: 0.58rem; letter-spacing: 0.2em; text-transform: uppercase;
}
.rk-castle__pick {
    appearance: none; width: 100%;
    padding: 0.55rem 2rem 0.55rem 0.8rem; border-radius: 10px;
    border: 1px solid var(--rh-line); background: rgba(8, 9, 16, 0.85);
    color: #fff; font-size: 0.9rem; cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, var(--rh-gold) 50%), linear-gradient(135deg, var(--rh-gold) 50%, transparent 50%);
    background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%;
    background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.rk-castle__pick:focus { outline: none; border-color: var(--rh-gold); }
.rk-castle__pick option { background: #12141f; color: #fff; }
.rk-castle__meta { display: flex; gap: 1rem; }
.rk-castle__meta span {
    color: var(--rh-mut, #9aa8c2); font-size: 0.6rem; letter-spacing: 0.16em; text-transform: uppercase;
}
.rk-castle__meta b { color: var(--rh-gold-bright); font-size: 0.9rem; letter-spacing: 0; }

@media (max-width: 1000px) {
    .rh-gp2-grid { grid-template-columns: 1fr; }
    .rk-castle__stage { height: 380px; }
}
@media (max-width: 640px) {
    .rh-gp2-tr { grid-template-columns: 38px minmax(0, 1fr) 70px; }
    .rh-gp2-tr .rh-gp2-hp, .rh-gp2-tr .rh-gp2-mp, .rh-gp2-tr .rh-gp2-join { display: none; }
    .rh-gp2-fact { min-width: 130px; }
}
