/* ============================================================
   RÚNÁK — PREMIUM RUNE SANCTUM LAYER
   Önálló, utolsóként betöltődő vizuális réteg. A rúnák adataihoz,
   kiválasztásához és mentési logikájához nem nyúl.
   ============================================================ */

body.runes-page {
    --rpp-gold: #dfb861;
    --rpp-gold-bright: #ffe6a1;
    --rpp-cyan: #59d8ef;
    --rpp-violet: #a476ff;
    --rpp-line: rgba(122, 191, 216, 0.18);
    --rpp-panel: rgba(5, 12, 21, 0.93);
    --rpp-panel-deep: rgba(2, 7, 13, 0.97);
    min-height: 100vh;
    padding: 96px clamp(18px, 3vw, 50px) 64px;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background:
        radial-gradient(circle at 12% 22%, rgba(67, 153, 184, 0.14), transparent 28%),
        radial-gradient(circle at 88% 70%, rgba(137, 82, 202, 0.13), transparent 31%),
        linear-gradient(145deg, #02060c 0%, #07111b 48%, #03060b 100%);
}

body.runes-page .legal-site-footer {
    box-sizing: border-box;
    flex: 0 0 auto;
    width: 100%;
}

body.runes-page::before,
body.runes-page::after {
    content: "";
    position: fixed;
    inset: 72px 0 0;
    z-index: -2;
    pointer-events: none;
}

body.runes-page::before {
    opacity: 0.28;
    background-image:
        linear-gradient(rgba(89, 216, 239, 0.026) 1px, transparent 1px),
        linear-gradient(90deg, rgba(89, 216, 239, 0.026) 1px, transparent 1px);
    background-size: 58px 58px;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 15%, #000 82%, transparent);
    mask-image: linear-gradient(to bottom, transparent, #000 15%, #000 82%, transparent);
}

body.runes-page::after {
    background:
        radial-gradient(circle at 50% 0, rgba(89, 216, 239, 0.11), transparent 34%),
        linear-gradient(90deg, rgba(1, 5, 10, 0.85), transparent 9%, transparent 91%, rgba(1, 5, 10, 0.85));
}

.runes-arcane-bg {
    z-index: -1;
    opacity: 0.52;
    filter: saturate(0.8);
}

.runes-view {
    width: min(100%, 1660px);
    max-width: none;
    box-sizing: border-box;
}

.runes-view-center { width: 100%; }

/* ---------- Szentély fejléc ---------- */

.rpp-sanctum-hero {
    position: relative;
    isolation: isolate;
    width: 100%;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    padding: 38px clamp(34px, 5vw, 82px);
    box-sizing: border-box;
    overflow: hidden;
    border: 1px solid rgba(223, 184, 97, 0.3);
    background:
        radial-gradient(circle at 82% 50%, rgba(164, 118, 255, 0.15), transparent 21%),
        linear-gradient(90deg, rgba(2, 8, 15, 0.98), rgba(5, 14, 24, 0.91) 53%, rgba(4, 10, 18, 0.76));
    box-shadow: 0 27px 72px rgba(0, 0, 0, 0.42), inset 0 0 90px rgba(0, 0, 0, 0.42);
    clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 28px 100%, 0 calc(100% - 28px));
}

.rpp-sanctum-hero::before {
    content: "";
    position: absolute;
    inset: 10px;
    z-index: -1;
    border: 1px solid rgba(89, 216, 239, 0.12);
    clip-path: inherit;
}

.rpp-sanctum-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--rpp-cyan), var(--rpp-gold), var(--rpp-violet), transparent);
    box-shadow: 0 0 20px rgba(89, 216, 239, 0.5);
}

.rpp-sanctum-copy { max-width: 820px; }

.rpp-eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--rpp-gold);
    font: 700 0.65rem/1 "Montserrat", sans-serif;
    letter-spacing: 0.23em;
    text-transform: uppercase;
}

.rpp-eyebrow span {
    width: 36px;
    height: 1px;
    background: linear-gradient(90deg, transparent, currentColor);
}

.rpp-eyebrow span:last-child { background: linear-gradient(90deg, currentColor, transparent); }

.runes-title {
    margin: 12px 0 9px;
    color: #f5f0e6;
    font-size: clamp(3rem, 5vw, 5.3rem);
    line-height: 1;
    letter-spacing: 0.04em;
    text-align: left;
    text-transform: uppercase;
    text-shadow: 0 7px 30px rgba(0, 0, 0, 0.75);
}

.runes-subtitle {
    max-width: 720px;
    margin: 0;
    color: rgba(206, 223, 230, 0.68);
    font-size: 0.95rem;
    line-height: 1.65;
    text-align: left;
    opacity: 1;
}

.rpp-sanctum-status {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 26px;
    margin-top: 23px;
    color: rgba(187, 208, 216, 0.52);
    font: 700 0.59rem/1 "Montserrat", sans-serif;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.rpp-sanctum-status span { display: inline-flex; align-items: center; gap: 7px; }

.rpp-sanctum-status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #63efad;
    box-shadow: 0 0 10px #63efad;
    animation: rppPulse 2.5s ease-in-out infinite;
}

.rpp-sanctum-seal {
    position: relative;
    width: 172px;
    height: 172px;
    flex: 0 0 172px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(223, 184, 97, 0.3);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(164, 118, 255, 0.13), rgba(3, 9, 16, 0.82) 60%, rgba(89, 216, 239, 0.09));
    box-shadow: 0 0 52px rgba(164, 118, 255, 0.12), inset 0 0 30px rgba(89, 216, 239, 0.07);
}

.rpp-sanctum-seal__orbit {
    position: absolute;
    inset: 10px;
    border: 1px dashed rgba(89, 216, 239, 0.42);
    border-radius: 50%;
    animation: rppSpin 26s linear infinite;
}

.rpp-sanctum-seal__orbit::before,
.rpp-sanctum-seal__orbit::after {
    content: "";
    position: absolute;
    left: 50%;
    top: -4px;
    width: 7px;
    height: 7px;
    transform: translateX(-50%) rotate(45deg);
    background: var(--rpp-gold);
    box-shadow: 0 0 12px var(--rpp-gold);
}

.rpp-sanctum-seal__orbit::after { top: auto; bottom: -4px; }

.rpp-sanctum-seal img {
    width: 92px;
    height: 92px;
    object-fit: contain;
    filter: drop-shadow(0 0 18px rgba(164, 118, 255, 0.55));
    animation: rppRuneFloat 4.2s ease-in-out infinite;
}

.rpp-sanctum-seal small {
    position: absolute;
    bottom: 25px;
    color: rgba(151, 214, 230, 0.5);
    font: 700 0.45rem/1 "Montserrat", sans-serif;
    letter-spacing: 0.2em;
}

/* ---------- Rúnakódex galéria ---------- */

.rpp-pages-panel {
    position: relative;
    width: 100%;
    min-height: 420px;
    margin-top: 18px;
    padding: 0 clamp(18px, 2.5vw, 38px) 42px;
    box-sizing: border-box;
    border: 1px solid var(--rpp-line);
    background:
        linear-gradient(145deg, rgba(89, 216, 239, 0.025), transparent 26%),
        rgba(3, 9, 16, 0.84);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.31), inset 0 1px rgba(255, 255, 255, 0.024);
}

.rpp-pages-panel::before {
    content: "";
    position: absolute;
    left: -1px;
    top: -1px;
    width: 110px;
    height: 1px;
    background: linear-gradient(90deg, var(--rpp-gold), transparent);
    box-shadow: 0 0 13px rgba(223, 184, 97, 0.4);
}

.rpp-pages-heading {
    min-height: 94px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin: 0 calc(clamp(18px, 2.5vw, 38px) * -1) 34px;
    padding: 17px clamp(22px, 3vw, 44px);
    box-sizing: border-box;
    border-bottom: 1px solid var(--rpp-line);
    background: linear-gradient(90deg, rgba(89, 216, 239, 0.045), transparent 60%);
}

.rpp-pages-heading span {
    display: block;
    margin-bottom: 6px;
    color: var(--rpp-gold);
    font: 700 0.56rem/1 "Montserrat", sans-serif;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.rpp-pages-heading h2 {
    margin: 0;
    color: #f0eee8;
    font: 400 clamp(1.35rem, 2.2vw, 2rem)/1.1 "AOW", serif;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.rpp-pages-heading p {
    margin: 0;
    color: rgba(184, 205, 214, 0.47);
    font-size: 0.78rem;
}

.runes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    align-items: stretch;
    justify-content: stretch;
    gap: 16px;
    width: 100%;
    max-width: none;
}

.rune-card {
    position: relative;
    isolation: isolate;
    width: auto;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 27px 18px 22px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--rune-accent) 32%, transparent);
    border-radius: 0;
    background:
        radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--rune-accent) 12%, transparent), transparent 42%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 40%),
        rgba(3, 9, 16, 0.9);
    box-shadow: 0 15px 34px rgba(0, 0, 0, 0.3), inset 0 1px rgba(255, 255, 255, 0.025);
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.rune-card::before {
    content: "";
    position: absolute;
    inset: 8px;
    z-index: -1;
    border: 1px solid color-mix(in srgb, var(--rune-accent) 11%, transparent);
    clip-path: inherit;
    pointer-events: none;
}

.rune-card::after {
    content: "RUNE PAGE";
    position: absolute;
    top: 14px;
    left: 16px;
    color: color-mix(in srgb, var(--rune-accent) 48%, transparent);
    font: 700 0.44rem/1 "Montserrat", sans-serif;
    letter-spacing: 0.18em;
}

.rune-card:hover {
    transform: translateY(-7px);
    border-color: color-mix(in srgb, var(--rune-accent) 72%, transparent);
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.42), 0 0 28px color-mix(in srgb, var(--rune-accent) 16%, transparent);
}

.rune-card-icon-wrap {
    position: relative;
    width: 128px;
    height: 128px;
    margin: 0 auto 20px;
    border: 1px solid color-mix(in srgb, var(--rune-accent) 55%, transparent);
    background:
        radial-gradient(circle, color-mix(in srgb, var(--rune-accent) 21%, transparent), transparent 68%),
        rgba(1, 6, 11, 0.66);
    box-shadow: 0 0 0 8px rgba(2, 7, 13, 0.45), 0 0 28px color-mix(in srgb, var(--rune-accent) 13%, transparent), inset 0 0 24px rgba(0, 0, 0, 0.38);
}

.rune-card-icon-wrap::before {
    content: "";
    position: absolute;
    inset: 8px;
    border: 1px dashed color-mix(in srgb, var(--rune-accent) 38%, transparent);
    border-radius: 50%;
    animation: rppSpin 28s linear infinite;
}

.rune-card-icon {
    width: 68%;
    height: 68%;
    filter: drop-shadow(0 0 12px color-mix(in srgb, var(--rune-accent) 72%, transparent));
    transition: transform 260ms ease, filter 260ms ease;
}

.rune-card:hover .rune-card-icon {
    transform: scale(1.08);
    filter: drop-shadow(0 0 19px color-mix(in srgb, var(--rune-accent) 85%, transparent));
}

.rune-card-name {
    max-width: 100%;
    color: #f1eee7;
    font: 400 1rem/1.25 "AOW", serif;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    text-shadow: 0 4px 14px rgba(0, 0, 0, 0.65);
}

.rune-card-add { --rune-accent: #718d9d; border-style: dashed; }
.rune-card-add::after { content: "NEW INSCRIPTION"; }

.rune-card-add .rune-card-icon-wrap {
    border-style: solid;
    background: radial-gradient(circle, rgba(89, 216, 239, 0.08), transparent 68%), rgba(1, 6, 11, 0.62);
}

.rune-card-add-icon {
    width: 53%;
    height: 53%;
    filter: drop-shadow(0 0 10px rgba(89, 216, 239, 0.28));
}

/* ---------- Szerkesztő keret és HUD ---------- */

#runes-editor {
    position: relative;
    min-height: calc(100vh - 160px);
    padding-top: 88px;
    border: 1px solid var(--rpp-line);
    background:
        radial-gradient(circle at 50% 36%, rgba(89, 216, 239, 0.06), transparent 25%),
        linear-gradient(rgba(89, 216, 239, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(89, 216, 239, 0.018) 1px, transparent 1px),
        rgba(3, 9, 16, 0.72);
    background-size: auto, 52px 52px, 52px 52px, auto;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34), inset 0 0 90px rgba(0, 0, 0, 0.2);
}

#runes-editor::before,
#runes-editor::after {
    content: "";
    position: absolute;
    top: 126px;
    bottom: 50px;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(89, 216, 239, 0.19), transparent);
}

#runes-editor::before { left: 22px; }
#runes-editor::after { right: 22px; }

.rpp-editor-label {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 44px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 19px;
    border-bottom: 1px solid var(--rpp-line);
    background: rgba(2, 7, 13, 0.7);
    color: rgba(184, 205, 214, 0.4);
    font: 700 0.5rem/1 "Montserrat", sans-serif;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.rpp-editor-label span:first-child { color: rgba(223, 184, 97, 0.7); }

.rpp-editor-label i {
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, rgba(89, 216, 239, 0.2), transparent);
}

.rune-editor-toolbar {
    position: fixed;
    top: 88px;
    left: 50%;
    width: min(calc(100% - 40px), 1560px);
    min-height: 58px;
    transform: translateX(-50%);
    justify-content: center;
    padding: 8px 14px;
    box-sizing: border-box;
    border: 1px solid rgba(122, 191, 216, 0.18);
    background: rgba(3, 9, 16, 0.94);
    box-shadow: 0 15px 34px rgba(0, 0, 0, 0.34), inset 0 1px rgba(255, 255, 255, 0.025);
    backdrop-filter: blur(13px);
}

.rune-gold-btn {
    min-height: 39px;
    padding: 9px 17px;
    border-radius: 0;
    font: 700 0.64rem/1 "Montserrat", sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.rune-gold-btn--outline {
    border-color: rgba(223, 184, 97, 0.36);
    background: linear-gradient(135deg, rgba(223, 184, 97, 0.06), rgba(2, 7, 13, 0.75));
    color: rgba(244, 213, 142, 0.8);
}

.rune-gold-btn--outline:hover {
    border-color: rgba(223, 184, 97, 0.7);
    background: rgba(223, 184, 97, 0.09);
    box-shadow: 0 0 18px rgba(223, 184, 97, 0.09);
}

.rune-gold-btn--solid {
    border: 1px solid #f0ce83;
    background: linear-gradient(180deg, #f5d991, #b88a38);
    color: #160f04;
    box-shadow: 0 0 18px rgba(223, 184, 97, 0.19);
}

.rune-gold-btn--solid:disabled {
    border-color: rgba(122, 191, 216, 0.12);
    background: rgba(255, 255, 255, 0.035);
    color: rgba(188, 205, 211, 0.27);
}

.rune-gold-btn--danger {
    border-color: rgba(255, 100, 112, 0.42);
    color: #ff9aa2;
    background: rgba(130, 25, 35, 0.09);
}

#rune-page-name {
    width: min(280px, 30vw);
    min-height: 39px;
    box-sizing: border-box;
    border-radius: 0;
    border-color: rgba(89, 216, 239, 0.26);
    background: rgba(1, 6, 11, 0.72);
    color: #edf3f4;
    outline: none;
}

#rune-page-name:focus {
    border-color: rgba(89, 216, 239, 0.62);
    box-shadow: 0 0 18px rgba(89, 216, 239, 0.08);
}

#rune-page-name::placeholder { color: rgba(181, 201, 209, 0.32); }

.rune-page-summary {
    position: fixed;
    top: 158px;
    left: 50%;
    z-index: 9;
    width: min(calc(100% - 48px), 980px);
    max-width: 980px;
    transform: translateX(-50%);
    justify-content: center;
    padding: 11px 17px;
    box-sizing: border-box;
    border: 1px solid rgba(89, 216, 239, 0.2);
    border-radius: 0;
    background: rgba(3, 9, 16, 0.92);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
}

.rune-page-summary-stat {
    padding: 4px 9px;
    border: 1px solid rgba(122, 191, 216, 0.09);
    background: rgba(255, 255, 255, 0.015);
    color: rgba(207, 222, 227, 0.65);
    font-size: 0.74rem;
}

.rune-page-summary-stat img {
    width: 18px;
    height: 18px;
    filter: drop-shadow(0 0 6px rgba(89, 216, 239, 0.2));
}

.rune-page-summary-stat strong { color: var(--rpp-gold-bright); }

.rune-editor-center {
    min-height: 780px;
    justify-content: flex-start;
    padding: 90px 20px 110px;
    box-sizing: border-box;
}

.rpp-editor-eyebrow {
    margin-bottom: 8px;
    color: rgba(223, 184, 97, 0.68);
    font: 700 0.56rem/1 "Montserrat", sans-serif;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.rune-banner-wrap {
    height: 165px;
    justify-content: flex-end;
}

.rune-banner-glow {
    top: -145%;
    width: 350px;
    height: 1180px;
    opacity: 0.74;
    filter: drop-shadow(0 0 24px currentColor);
}

.rune-editor-title {
    margin-bottom: 13px;
    color: #f3efe6;
    font-size: clamp(1.55rem, 2.5vw, 2.15rem);
    letter-spacing: 0.065em;
    text-transform: uppercase;
    text-shadow: 0 5px 20px rgba(0, 0, 0, 0.65), 0 0 16px rgba(89, 216, 239, 0.2);
}

/* ---------- Lélek és rúnagerinc ---------- */

.rune-soul-disc {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(89, 216, 239, 0.08), transparent 68%);
    filter: drop-shadow(0 0 22px rgba(89, 216, 239, 0.13));
    transition: transform 220ms ease, filter 220ms ease;
}

.rune-soul-disc::before {
    content: "";
    position: absolute;
    inset: 12px;
    border: 1px dashed rgba(89, 216, 239, 0.25);
    border-radius: 50%;
    animation: rppSpin 24s linear infinite;
}

.rune-soul-disc:hover {
    transform: scale(1.045);
    filter: drop-shadow(0 0 30px rgba(89, 216, 239, 0.25));
}

.rune-soul-disc-ring { filter: drop-shadow(0 0 11px rgba(89, 216, 239, 0.26)); }

.rune-soul-disc-icon {
    width: 72%;
    height: 72%;
    filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.18));
    animation: rppRuneFloat 3.8s ease-in-out infinite;
}

.rune-soul-row {
    max-width: calc(100vw - 60px);
    gap: 8px;
    margin-top: 4px;
    padding: 12px;
    overflow-x: auto;
    border: 1px solid rgba(89, 216, 239, 0.24);
    border-radius: 0;
    background: rgba(2, 7, 13, 0.95);
    box-shadow: 0 17px 38px rgba(0, 0, 0, 0.5), 0 0 24px rgba(89, 216, 239, 0.055);
    scrollbar-width: thin;
    scrollbar-color: rgba(89, 216, 239, 0.28) transparent;
}

.rune-soul-option {
    min-width: 76px;
    min-height: 82px;
    border-width: 1px;
    border-radius: 0;
    opacity: 0.42;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.rune-soul-option img {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 0 7px color-mix(in srgb, var(--rune-accent) 55%, transparent));
}

.rune-soul-option span {
    color: rgba(221, 232, 235, 0.67);
    font-size: 0.61rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.rune-soul-option:hover,
.rune-soul-option.is-active {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--rune-accent) 72%, transparent);
    background: color-mix(in srgb, var(--rune-accent) 11%, rgba(2, 7, 13, 0.9));
    box-shadow: 0 0 17px color-mix(in srgb, var(--rune-accent) 10%, transparent);
}

.rune-spine {
    margin-top: 18px;
    gap: 34px;
    padding: 13px 80px 25px;
}

.rune-spine::before {
    content: "";
    position: absolute;
    inset: -20px -70px -28px;
    z-index: -1;
    border: 1px solid color-mix(in srgb, var(--rune-accent) 12%, transparent);
    background: radial-gradient(circle at 50% 20%, color-mix(in srgb, var(--rune-accent) 6%, transparent), transparent 58%);
    clip-path: polygon(0 18px, 18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px));
}

.rune-spine-line {
    top: -3%;
    width: 2px;
    height: 103%;
    background: linear-gradient(180deg, transparent, var(--rune-accent) 10%, var(--rune-accent) 82%, transparent);
    box-shadow: 0 0 13px var(--rune-accent);
}

.rune-tier::before {
    content: "";
    position: absolute;
    left: -57px;
    top: 50%;
    transform: translateY(-50%);
    color: color-mix(in srgb, var(--rune-accent) 38%, transparent);
    font: 400 0.62rem/1 "AOW", serif;
}

.rune-tier[data-tier-index="0"]::before { content: "I"; }
.rune-tier[data-tier-index="1"]::before { content: "II"; }
.rune-tier[data-tier-index="2"]::before { content: "III"; }

.rune-tier-row { gap: 30px; }

.rune-tier-row.is-open::before {
    left: 44px;
    right: 44px;
    height: 2px;
    box-shadow: 0 0 10px var(--rune-accent);
}

.rune-slot {
    width: 108px;
    height: 108px;
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.65));
}

.rune-slot::before {
    content: "";
    position: absolute;
    inset: 13px;
    transform: rotate(45deg);
    border: 1px solid color-mix(in srgb, var(--rune-accent) 25%, transparent);
    background: rgba(2, 7, 13, 0.46);
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.rune-slot:not(:disabled):hover {
    transform: scale(1.1) translateY(-2px);
    filter: drop-shadow(0 0 15px color-mix(in srgb, var(--rune-accent) 45%, transparent));
}

.rune-slot:not(:disabled):hover::before,
.rune-slot.is-current::before {
    border-color: color-mix(in srgb, var(--rune-accent) 75%, transparent);
    box-shadow: 0 0 16px color-mix(in srgb, var(--rune-accent) 28%, transparent);
}

.rune-slot.is-current {
    transform: scale(1.04);
    filter: drop-shadow(0 0 18px var(--rune-accent));
}

.rune-slot-icon {
    position: relative;
    z-index: 1;
    width: 91%;
    height: 91%;
    object-fit: contain;
    filter: saturate(1.05) contrast(1.04);
}

.item-tooltip.item-tooltip-floating {
    border-radius: 0;
    border-color: rgba(223, 184, 97, 0.35);
    background: rgba(2, 7, 13, 0.97);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.5), 0 0 20px rgba(223, 184, 97, 0.07);
}

@keyframes rppPulse { 0%, 100% { opacity: 0.5; transform: scale(0.78); } 50% { opacity: 1; transform: scale(1); } }
@keyframes rppSpin { to { transform: rotate(360deg); } }
@keyframes rppRuneFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

@media (max-width: 1000px) {
    body.runes-page { padding-inline: 20px; }
    .rpp-sanctum-hero { min-height: 235px; }
    .rpp-sanctum-seal { width: 142px; height: 142px; flex-basis: 142px; }
    .rpp-sanctum-seal img { width: 76px; height: 76px; }
    .runes-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
    .rune-editor-toolbar {
        position: relative;
        top: auto;
        left: auto;
        width: calc(100% - 28px);
        transform: none;
        flex-wrap: wrap;
        margin: -28px auto 16px;
    }
    .rune-page-summary {
        position: relative;
        top: auto;
        left: auto;
        width: calc(100% - 28px);
        transform: none;
        margin: 0 auto 8px;
    }
    #runes-editor { padding-top: 74px; }
    .rune-editor-center { padding-top: 20px; }
}

@media (max-width: 700px) {
    body.runes-page { padding: 88px 11px 58px; }
    .rpp-sanctum-hero {
        min-height: 280px;
        padding: 30px 23px;
        clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
    }
    .rpp-sanctum-seal { display: none; }
    .rpp-eyebrow span { width: 18px; }
    .rpp-sanctum-status { gap: 10px 15px; }
    .rpp-pages-panel { padding-inline: 14px; }
    .rpp-pages-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
        margin-inline: -14px;
        padding-block: 20px;
    }
    .runes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .rune-card { min-height: 210px; padding-inline: 10px; }
    .rune-card-icon-wrap { width: 102px; height: 102px; }
    .rune-card-name { font-size: 0.8rem; }
    #runes-editor { min-height: calc(100vh - 120px); padding-top: 65px; }
    .rpp-editor-label span:last-child { display: none; }
    .rune-editor-toolbar { width: calc(100% - 18px); gap: 7px; }
    #rune-page-name { order: -1; width: 100%; }
    .rune-gold-btn { flex: 1; padding-inline: 9px; font-size: 0.56rem; }
    .rune-page-summary { width: calc(100% - 18px); justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
    .rune-editor-center { min-height: 700px; padding-inline: 6px; }
    .rune-banner-wrap { height: 145px; }
    .rune-banner-glow { width: 300px; }
    .rune-soul-disc { width: 150px; height: 150px; }
    .rune-spine { padding-inline: 54px; }
    .rune-spine::before { inset-inline: -36px; }
    .rune-tier::before { left: -39px; }
    .rune-slot { width: 92px; height: 92px; }
    .rune-tier-row { gap: 10px; }
}

@media (max-width: 430px) {
    .runes-title { font-size: 2.42rem; }
    .runes-subtitle { font-size: 0.85rem; }
    .rpp-sanctum-status span:nth-child(n+2) { display: none; }
    .runes-grid { grid-template-columns: 1fr; }
    .rune-card { min-height: 220px; }
    .rune-card-icon-wrap { width: 112px; height: 112px; }
    .rune-editor-toolbar { align-items: stretch; }
    .rune-gold-btn { min-width: calc(50% - 4px); }
    .rune-spine { padding-inline: 45px; }
    .rune-spine::before { inset-inline: -25px; }
    .rune-slot { width: 86px; height: 86px; }
}

@media (prefers-reduced-motion: reduce) {
    .rpp-sanctum-status i,
    .rpp-sanctum-seal__orbit,
    .rpp-sanctum-seal img,
    .rune-card-icon-wrap::before,
    .rune-soul-disc::before,
    .rune-soul-disc-icon { animation: none !important; }
}
