/* ==========================================================================
   Rogue Asylum — in-game stylesheet 
   ========================================================================== */

:root {
    --ra-red: #e5393a;
    --ra-cream: #ece8dc;
    --ra-text: #a9a6a0;
    --ra-muted: #6f6c68;
    --ra-bg: #0c0c0e;
    --ra-panel: #121112;
    --ra-field: #151414;
    --ra-line: rgba(255, 255, 255, .09);
    --ra-serif: "Cinzel", "Trajan Pro", "Times New Roman", serif;
    --ra-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --ra-type: "Special Elite", "Courier New", monospace;
    --ra-bar-h: 58px;
}

/* ---------- Bootstrap dark theme tuned to the site colors ---------- */
[data-bs-theme="dark"] {
    --bs-body-bg: #0c0c0e;
    --bs-body-color: #a9a6a0;
    --bs-emphasis-color: #ece8dc;
    --bs-border-color: rgba(255, 255, 255, .12);
    --bs-link-color: #ece8dc;
    --bs-link-color-rgb: 236, 232, 220;
    --bs-link-hover-color: #e5393a;
    --bs-link-hover-color-rgb: 229, 57, 58;
    --bs-primary: #e5393a;
    --bs-primary-rgb: 229, 57, 58;
}
.btn-primary {
    --bs-btn-color: #fff; --bs-btn-bg: var(--ra-red); --bs-btn-border-color: var(--ra-red);
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #f0494a; --bs-btn-hover-border-color: #f0494a;
    --bs-btn-active-color: #fff; --bs-btn-active-bg: #c93030; --bs-btn-active-border-color: #c93030;
    --bs-btn-disabled-color: #fff; --bs-btn-disabled-bg: var(--ra-red); --bs-btn-disabled-border-color: var(--ra-red);
    --bs-btn-focus-shadow-rgb: 229, 57, 58;
}

/* ---------- Page ---------- */
body.ra-app {
    margin: 0;
    background-color: var(--ra-bg);
    background-image:
        repeating-linear-gradient(0deg,  rgba(255, 255, 255, .022) 0 1px, transparent 1px 3px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 3px);
    color: var(--ra-text);
    font-family: var(--ra-sans);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
.ra-app a { color: var(--ra-cream); text-decoration: none; }
.ra-app a:hover { color: var(--ra-red); }
.ra-app ::selection { color: #fff; background: rgba(229, 57, 58, .5); }
.ra-app :focus-visible { outline: 2px solid var(--ra-red); outline-offset: 2px; }
.ra-app img { max-width: 100%; height: auto; }
.ra-accent, .text-main-1 { color: var(--ra-red) !important; }
.ra-skip { position: absolute; left: -9999px; top: 0; z-index: 2000; padding: .6rem 1rem; background: var(--ra-red); color: #fff; }
.ra-skip:focus { left: 0; }

/* ---------- Top strip ---------- */
.ra-topstrip {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    padding: .25rem 1rem;
    background: rgba(0, 0, 0, .6);
    border-bottom: 1px solid var(--ra-line);
}
.ra-topstrip ul { display: flex; gap: .15rem; margin: 0; padding: 0; list-style: none; }
.ra-iconlink {
    display: inline-grid; place-items: center; width: 36px; height: 36px;
    border-radius: 8px; color: #8a8782 !important; font-size: 1.15rem;
}
.ra-iconlink:hover { color: var(--ra-cream) !important; background: rgba(255, 255, 255, .06); }

/* ---------- Bar ---------- */
.ra-bar {
    position: sticky; top: 0; z-index: 1030;
    background: rgba(8, 8, 10, .94);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--ra-line);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}
.ra-bar__inner {
    display: flex; align-items: center; gap: 1rem;
    max-width: 1320px; min-height: var(--ra-bar-h); margin: 0 auto; padding: .5rem 1rem;
}
.ra-brand { display: flex; align-items: center; gap: .7rem; color: var(--ra-cream) !important; }
.ra-brand img { display: block; width: auto; height: 40px; }
.ra-brand__name {
    font-family: var(--ra-serif); font-size: 1.15rem; font-weight: 700;
    letter-spacing: .08em; line-height: 1; text-transform: uppercase;
}
.ra-bar__quick { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.ra-bar__link {
    display: inline-flex; align-items: center; gap: .5rem; min-height: 40px; padding: 0 .9rem;
    border-radius: 8px; font-size: .9rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.ra-bar__link:hover { background: rgba(255, 255, 255, .06); }
.ra-burger {
    display: none; margin-left: auto; width: 46px; height: 46px; padding: 0;
    place-content: center; gap: 5px; background: transparent;
    border: 1px solid var(--ra-line); border-radius: 10px; cursor: pointer;
}
.ra-burger span { display: block; width: 22px; height: 2px; background: var(--ra-cream); border-radius: 2px; }
.ra-burger:hover { border-color: rgba(255, 255, 255, .3); }

/* ---------- Shell: sidebar + content ---------- */
.ra-shell {
    display: grid; grid-template-columns: 288px minmax(0, 1fr); gap: 1.25rem; align-items: start;
    max-width: 1320px; margin: 1.25rem auto 2rem; padding: 0 1rem;
}
.ra-side {
    display: flex; flex-direction: column; gap: 1rem;
    position: sticky; top: calc(var(--ra-bar-h) + 1rem);
    max-height: calc(100vh - var(--ra-bar-h) - 2rem);
    overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
}
.ra-bar-off .ra-side { top: 1rem; max-height: calc(100vh - 2rem); }
.ra-side__close, .ra-overlay { display: none; }
.ra-content { min-width: 0; }
.ra-main { min-height: 40vh; }

.ra-statusrow { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.ra-brandline { display: none; align-items: center; gap: .8rem; }
.ra-brandline img { height: 52px; width: auto; }
.ra-brandline .ra-brand__name { font-size: 1.35rem; }

@media (min-width: 992px) {
    .ra-bar-off .ra-bar { display: none; }
    .ra-bar-off .ra-brandline { display: flex; }
}
@media (max-width: 991.98px) {
    .ra-bar__quick { display: none; }
    .ra-burger { display: grid; }
    .ra-bar-off .ra-bar { position: static; }
    .ra-shell { display: block; margin-top: 1rem; }
    .ra-side {
        position: fixed; inset: 0 0 0 auto; z-index: 1100;
        width: min(88vw, 360px); max-height: none; padding: 1rem;
        background: #0f0f11; border-left: 1px solid var(--ra-line);
        box-shadow: -20px 0 60px rgba(0, 0, 0, .6);
        transform: translateX(100%); visibility: hidden;
        transition: transform .25s ease, visibility 0s linear .25s;
    }
    body.ra-drawer-open .ra-side { transform: none; visibility: visible; transition: transform .25s ease; }
    .ra-side__close {
        display: grid; place-items: center; align-self: flex-end; flex: none;
        width: 42px; height: 42px; padding: 0; background: transparent;
        border: 1px solid var(--ra-line); border-radius: 10px; color: var(--ra-cream); cursor: pointer;
    }
    .ra-overlay {
        display: block; position: fixed; inset: 0; z-index: 1090; background: rgba(0, 0, 0, .7);
        opacity: 0; pointer-events: none; transition: opacity .25s;
    }
    body.ra-drawer-open .ra-overlay { opacity: 1; pointer-events: auto; }
    body.ra-drawer-open { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
    .ra-side, .ra-overlay, .ra-stat__bar { transition: none !important; }
}

/* ---------- Side panels: information + menu ---------- */
.ra-info, .ra-sec {
    padding: 1rem; background: var(--ra-panel);
    border: 1px solid var(--ra-line); border-radius: 14px;
}
.ra-sec__title, .as-widget-title {
    display: flex; align-items: center; gap: .8rem; margin: 0 0 .75rem;
    font-family: var(--ra-serif); font-size: .8rem; font-weight: 700;
    letter-spacing: .2em; text-transform: uppercase; color: var(--ra-cream);
}
.ra-sec__title::after, .as-widget-title::after {
    content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--ra-red), transparent);
}
.ra-menu { display: flex; flex-direction: column; gap: 1rem; }
.ra-sec ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.ra-link {
    display: flex; align-items: center; gap: .7rem; min-height: 40px; padding: .5rem .7rem;
    border-radius: 8px; color: var(--ra-text) !important; font-size: .95rem;
}
.ra-link .iconify { flex: none; width: 1.2rem; height: 1.2rem; color: #8a8782; }
.ra-link:hover { background: rgba(255, 255, 255, .05); color: var(--ra-cream) !important; }
.ra-link.is-active { background: rgba(229, 57, 58, .12); color: var(--ra-cream) !important; box-shadow: inset 2px 0 0 var(--ra-red); }
.ra-link.is-active .iconify { color: var(--ra-red); }
.ra-link.is-new { color: var(--ra-cream) !important; font-weight: 600; }
.ra-link.is-new::after { content: ""; width: 8px; height: 8px; margin-left: auto; border-radius: 50%; background: var(--ra-red); box-shadow: 0 0 8px var(--ra-red); }

.ra-info__body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .9rem; align-items: center; }
.ra-info__pic .iconify, .ra-info__pic img { border-radius: 10px; }
.ra-info__list { display: grid; gap: .1rem; margin: 0; font-size: .85rem; }
.ra-info__list div { display: flex; gap: .4rem; }
.ra-info__list dt { margin: 0; font-weight: 600; color: var(--ra-cream); }
.ra-info__list dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.ra-info__actions { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin-top: .8rem; padding-top: .7rem; border-top: 1px solid var(--ra-line); font-size: .8rem; }
.ra-info__actions a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Stat circles ---------- */
.ra-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; width: 100%; max-width: 520px; margin-left: auto; }
.ra-stat { --c: var(--ra-red); position: relative; width: 100%; max-width: 112px; margin: 0 auto; aspect-ratio: 1 / 1; }
.ra-stat--energy  { --c: #e0a030; }
.ra-stat--stamina { --c: #4f8fd6; }
.ra-stat--nerve   { --c: #e5393a; }
.ra-stat--health  { --c: #3fae6a; }
.ra-stat svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); }
.ra-stat__track, .ra-stat__bar { fill: none; stroke-width: 6; }
.ra-stat__track { stroke: rgba(255, 255, 255, .08); }
.ra-stat__bar { stroke: var(--c); stroke-linecap: round; filter: drop-shadow(0 0 3px var(--c)); transition: stroke-dashoffset .6s ease; }
.ra-stat--empty .ra-stat__bar { stroke-opacity: 0; }
.ra-stat__text { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.15; }
.ra-stat__label { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: #8a8782; }
.ra-stat__val { font-family: var(--ra-serif); font-size: 1.05rem; font-weight: 700; color: var(--ra-cream); }
@media (max-width: 575.98px) {
    .ra-stats { max-width: none; gap: .25rem; }
    .ra-stat__label { font-size: .58rem; letter-spacing: .04em; }
    .ra-stat__val { font-size: .85rem; }
}

/* ---------- Headings in page content ---------- */
.ra-main h1, .ra-main h2, .ra-main h3, .ra-main h4, .ra-main h5, .ra-main h6,
.ra-main .h1, .ra-main .h2, .ra-main .h3, .ra-main .h4, .ra-main .h5, .ra-main .h6 {
    margin: 0 0 1rem; font-family: var(--ra-serif); font-weight: 700;
    letter-spacing: .06em; line-height: 1.25; text-transform: uppercase; color: var(--ra-cream);
}
.ra-main h1 { font-size: 1.9rem; } .ra-main h2 { font-size: 1.5rem; } .ra-main h3 { font-size: 1.25rem; }
.ra-main h4, .ra-main .h4 { font-size: 1.05rem; } .ra-main h5 { font-size: .95rem; } .ra-main h6 { font-size: .85rem; }
.as-decorated-h-3 { display: flex; align-items: center; gap: 1rem; letter-spacing: .14em !important; }
.as-decorated-h-3::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--ra-red), transparent); }
.ra-main p { margin: 0 0 1rem; }
.ra-main strong, .ra-main b { color: var(--ra-cream); font-weight: 600; }

/* ---------- Panels (old main-container / main-row markup) ---------- */
.main-container, .box, .as-widget-highlighted, .as-feature-2, .card {
    --bs-gutter-x: 0;
    max-width: none; margin: 0 0 1.25rem; padding: 0;
    background: var(--ra-panel); border: 1px solid var(--ra-line); border-radius: 14px;
    color: var(--ra-text); overflow: hidden; overflow: clip;
}
.main-container .row, .box .row { --bs-gutter-x: 0; }
.container.main-container { padding: 0; }
.card { --bs-card-bg: transparent; --bs-card-border-color: transparent; }
.as-widget-highlighted .as-widget-title { padding: 1rem 1.1rem 0; }
.as-widget-content { padding: 1rem 1.1rem; }
.main-thead {
    padding: .85rem 1.1rem; background: linear-gradient(90deg, rgba(229, 57, 58, .18), transparent);
    border-left: 3px solid var(--ra-red); border-bottom: 1px solid var(--ra-line);
    font-family: var(--ra-serif); font-size: .9rem; font-weight: 700;
    letter-spacing: .14em; text-transform: uppercase; color: var(--ra-cream);
}
.main-row { padding: .8rem 1.1rem; margin: 0; border-top: 1px solid rgba(255, 255, 255, .05); }
.main-row:nth-of-type(odd) { background: rgba(255, 255, 255, .02); }
.main-row > * + * { border-left: 1px solid rgba(255, 255, 255, .05); }
.main-row > [class*="col"] { padding-inline: .5rem; }
@media (max-width: 575.98px) {
    .main-row { padding: .7rem .8rem; font-size: .9rem; }
    .main-row > * + * { border-left: 0; }
}
.as-blockquote { margin: 0; padding-left: 1rem; border-left: 3px solid var(--ra-red); font-style: italic; }
.as-badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--ra-red); color: #fff; font-size: .65rem; font-weight: 700; line-height: 18px; text-align: center; }
.as-gap, .as-gap-1, .as-gap-2 { display: block; height: 1rem; }
.as-gap-2 { height: 1.5rem; }
.as-img { max-width: 100%; height: auto; }
.text-small { font-size: .85em; }

/* ---------- Tables ---------- */
.ra-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 1.25rem; border-radius: 12px; }
.as-table { width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; color: var(--ra-text); }
.as-table thead th, .as-table thead td {
    padding: .8rem 1rem; background: rgba(255, 255, 255, .03); border-bottom: 1px solid rgba(229, 57, 58, .45);
    font-family: var(--ra-serif); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ra-cream); white-space: nowrap;
}
.as-table th { font-weight: 700; color: var(--ra-cream); }
.as-table td, .as-table tbody th { padding: .8rem 1rem; border-top: 1px solid rgba(255, 255, 255, .05); vertical-align: middle; }
.as-table tbody tr:nth-child(odd) { background: rgba(255, 255, 255, .02); }
.as-table tbody tr:hover { background: rgba(255, 255, 255, .04); }
@media (max-width: 575.98px) { .as-table td, .as-table thead th { padding: .6rem .7rem; font-size: .85rem; } }

/* ---------- Tabs ---------- */
.nav-tabs { gap: .4rem; flex-wrap: nowrap; overflow-x: auto; border: 0; padding-bottom: .35rem; scrollbar-width: thin; }
.nav-tabs .nav-link {
    display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; min-height: 42px; padding: 0 1rem;
    background: var(--ra-panel); border: 1px solid var(--ra-line); border-radius: 10px;
    font-family: var(--ra-serif); font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: var(--ra-text);
}
.nav-tabs .nav-link:hover { color: var(--ra-cream); border-color: rgba(255, 255, 255, .25); }
.nav-tabs .nav-link.active { background: var(--ra-red); border-color: var(--ra-red); color: #fff; box-shadow: 0 0 14px rgba(229, 57, 58, .35); }

/* ---------- Buttons ---------- */
.as-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 42px; padding: 0 1.2rem;
    border: 1px solid transparent; border-radius: 8px; background: #2a2a30; color: #fff !important; cursor: pointer;
    font-family: var(--ra-serif); font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
    transition: filter .15s ease, box-shadow .15s ease, transform .15s ease;
}
.as-btn:hover { filter: brightness(1.12); }
.as-btn-color-main-1 { background: var(--ra-red); box-shadow: 0 6px 20px rgba(229, 57, 58, .3); }
.as-btn-color-white { background: transparent; border-color: rgba(255, 255, 255, .25); color: var(--ra-cream) !important; }
.as-btn-color-dark-3 { background: #1b1b20; border-color: var(--ra-line); color: var(--ra-cream) !important; }
.as-btn-hover-color-main-1:hover { background: var(--ra-red); }
.as-btn-block { display: flex; width: 100%; }
.as-btn-sm, .as-btn-xs { min-height: 34px; padding: 0 .9rem; font-size: .72rem; }
.btn { border-radius: 8px; }

/* ---------- Forms ---------- */
.ra-app .form-control, .ra-app .form-select, .ra-app textarea {
    min-height: 44px; background-color: var(--ra-field); border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 10px; color: var(--ra-cream); font-size: 1rem;
}
.ra-app .form-control:focus, .ra-app .form-select:focus {
    background-color: var(--ra-field); border-color: var(--ra-red); color: var(--ra-cream);
    box-shadow: 0 0 0 3px rgba(229, 57, 58, .2);
}
.ra-app label { color: var(--ra-cream); font-weight: 600; }
.ra-app .form-text, .ra-app .text-muted { color: var(--ra-muted) !important; }
.modal-content { background: var(--ra-panel); border: 1px solid var(--ra-line); border-radius: 14px; }
.modal-header, .modal-footer { border-color: var(--ra-line); }
.modal-title { font-family: var(--ra-serif); letter-spacing: .1em; text-transform: uppercase; }
.ra-form-response:empty { display: none; }
.ra-form-response { margin-top: 1rem; }

/* ---------- Alert boxes (view/alerts/*.php) ---------- */
.as-info-box {
    display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .15rem 1rem; align-items: center;
    margin: 0 0 1.25rem; padding: 1rem 1.25rem; background: var(--ra-panel);
    border: 1px solid var(--ra-line); border-left: 3px solid currentColor; border-radius: 12px;
}
.as-info-box-icon { grid-row: 1 / span 2; display: grid; place-items: center; width: 48px; height: 48px; border: 2px solid currentColor; border-radius: 50%; }
.as-info-box-icon .iconify, .as-info-box-icon svg { width: 1.7rem !important; height: 1.7rem !important; }
.as-info-box h3 { margin: 0; font-family: var(--ra-serif); font-size: .85rem; letter-spacing: .16em; text-transform: uppercase; color: currentColor; }
.as-info-box em { font-style: normal; color: var(--ra-text); overflow-wrap: anywhere; }
.as-info-box em a { text-decoration: underline; }

/* ---------- Countdown hexagons (script builds .ra-hex) ---------- */
.as-countdown { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin: 1rem 0 1.5rem; }
.ra-hex {
    position: relative; display: grid; place-content: center; width: 112px; height: 128px; text-align: center;
    background: var(--ra-red); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.ra-hex::before { content: ""; position: absolute; inset: 4px; background: #0c0c0e; clip-path: inherit; }
.ra-hex > * { position: relative; }
.ra-hex__n { font-family: var(--ra-serif); font-size: 1.9rem; font-weight: 700; line-height: 1.1; color: var(--ra-cream); }
.ra-hex__l { font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: #8a8782; }
@media (max-width: 575.98px) {
    .as-countdown { flex-wrap: nowrap; gap: .35rem; }
    .ra-hex { flex: 1 1 0; width: auto; height: auto; max-width: 96px; aspect-ratio: 7 / 8; }
    .ra-hex__n { font-size: clamp(1rem, 5.4vw, 1.5rem); }
    .ra-hex__l { font-size: clamp(.42rem, 2.1vw, .56rem); letter-spacing: .04em; }
}

/* ---------- Landing announcements (div-based rows) ---------- */
.box .h4 .row > * { min-width: 0; font-size: clamp(.62rem, 2.9vw, 1rem); letter-spacing: .04em; }
.box .h4 .row > :nth-child(1) { flex: 0 0 auto; width: 44%; }
.box .h4 .row > :nth-child(2), .box .h4 .row > :nth-child(3) { flex: 0 0 auto; width: 28%; }
.box > .h4 { margin: 0; padding: .9rem 1rem !important; }
.ra-main .box.row { margin: 0; padding: .7rem 1rem; border-radius: 0; border-width: 0 0 1px; }
.ra-main .box .col { min-width: 0; overflow-wrap: anywhere; hyphens: none; }
@media (max-width: 575.98px) { .ra-main .box.row { font-size: .8rem; padding: .6rem .6rem; } }

/* ---------- Page numbers: vertical rail on the left of the content ---------- */
.row > .ra-rail { flex: 0 0 56px; width: 56px; max-width: 56px; padding: 0 .5rem 0 0; }
.ra-rail:empty { display: none; }
/* Keep the rail and the content on ONE line, and let the content shrink and scroll instead of wrapping below. */
.row:has(> .ra-rail) { flex-wrap: nowrap; }
.row > .ra-rail + .col, .ra-main .row > .col { min-width: 0; }
.ra-pages { position: sticky; top: calc(var(--ra-bar-h) + 1rem); }
.ra-bar-off .ra-pages { top: 1rem; }
.ra-pages__list { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ra-pages__btn {
    display: grid; place-items: center; width: 44px; height: 44px; background: var(--ra-panel);
    border: 1px solid var(--ra-line); border-radius: 10px; color: var(--ra-cream) !important;
    font-family: var(--ra-serif); font-size: 1rem; font-weight: 700;
}
a.ra-pages__btn:hover { border-color: var(--ra-red); background: rgba(229, 57, 58, .12); }
.ra-pages__btn svg { width: 18px; height: 18px; }
.ra-pages__list .is-current .ra-pages__btn { background: var(--ra-red); border-color: var(--ra-red); color: #fff !important; box-shadow: 0 0 14px rgba(229, 57, 58, .4); }
.ra-pages__list .is-disabled .ra-pages__btn { opacity: .3; }
.ra-pages__gap { line-height: 1; color: var(--ra-muted); }
.main-container .row > .ra-rail {
    flex: 0 0 68px; width: 68px; max-width: 68px; padding: .75rem .5rem;
    background: rgba(255, 255, 255, .015); border-right: 1px solid var(--ra-line);
}
@media (max-width: 575.98px) {
    .row > .ra-rail { flex-basis: 42px; width: 42px; max-width: 42px; padding-right: .25rem; }
    .main-container .row > .ra-rail { flex-basis: 54px; width: 54px; max-width: 54px; padding: .6rem .3rem; }
    .ra-pages__btn { width: 36px; height: 36px; font-size: .9rem; }
    .ra-pages__list li.is-far { display: none; }
}

/* ---------- Explore: six layouts, same links ---------- */
.ra-xp { margin: 0 0 1.5rem; }
.ra-xp-list { display: grid; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.ra-xp-box { padding: 1.1rem; background: var(--ra-panel); border: 1px solid var(--ra-line); border-radius: 14px; }
.ra-xp-title {
    display: flex; align-items: center; gap: .6rem; margin: 0 0 .8rem !important;
    font-size: .85rem !important; letter-spacing: .18em !important;
}
.ra-xp-title .iconify { width: 1.4rem; height: 1.4rem; color: var(--ra-red); }
.ra-xp-link {
    display: flex; align-items: center; gap: .65rem; min-height: 44px; padding: .55rem .8rem;
    background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .05);
    border-radius: 10px; color: var(--ra-text) !important; font-size: .95rem;
}
.ra-xp-link .iconify { flex: none; width: 1.25rem; height: 1.25rem; color: #8a8782; }
.ra-xp-link:hover { background: rgba(229, 57, 58, .08); border-color: rgba(229, 57, 58, .5); color: var(--ra-cream) !important; }
.ra-xp-link:hover .iconify { color: var(--ra-red); }
.ra-xp-grid { display: grid; gap: 1rem; }
/* 1 Compass */
.ra-xp--compass .ra-xp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: ". north ." "west center east" ". south ."; }
.ra-xp--compass .ra-xp-box--center { border-color: rgba(229, 57, 58, .45); box-shadow: 0 0 30px rgba(229, 57, 58, .08); }
/* 2 Cards */
.ra-xp--cards .ra-xp-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.ra-xp--cards .ra-xp-box { border-top: 3px solid var(--ra-red); }
/* 3 Wings */
.ra-xp--wings .ra-xp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "north center east" "west center south"; }
.ra-xp--wings .ra-xp-box--center { display: flex; flex-direction: column; justify-content: center; background: linear-gradient(180deg, rgba(229, 57, 58, .1), var(--ra-panel)); }
.ra-xp-area-north { grid-area: north; } .ra-xp-area-west { grid-area: west; } .ra-xp-area-center { grid-area: center; }
.ra-xp-area-east { grid-area: east; } .ra-xp-area-south { grid-area: south; }
@media (max-width: 767.98px) {
    .ra-xp--compass .ra-xp-grid, .ra-xp--wings .ra-xp-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "north" "west" "center" "east" "south"; }
}
/* 4 Tabs */
.ra-xp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem; padding: 1rem; background: var(--ra-panel); border: 1px solid var(--ra-line); border-radius: 14px; margin-top: .6rem; }
/* 5 Index */
.ra-xp--index { background: var(--ra-panel); border: 1px solid var(--ra-line); border-radius: 14px; overflow: hidden; }
.ra-xp-row { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 1rem; align-items: center; padding: .9rem 1.1rem; border-top: 1px solid var(--ra-line); }
.ra-xp-row:first-child { border-top: 0; }
.ra-xp-row .ra-xp-title { margin: 0 !important; }
.ra-xp-inline { display: flex; flex-wrap: wrap; gap: .3rem .2rem; }
.ra-xp--index .ra-xp-link { min-height: 36px; padding: .3rem .6rem; background: transparent; border-color: transparent; }
.ra-xp--index .ra-xp-link::after { content: "/"; margin-left: .6rem; color: var(--ra-muted); }
.ra-xp--index .ra-xp-inline > .ra-xp-link:last-child::after { content: none; }
@media (max-width: 575.98px) { .ra-xp-row { grid-template-columns: minmax(0, 1fr); gap: .4rem; } }
/* 6 Honeycomb */
.ra-xp--hive .ra-xp-hexrow { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-bottom: 1.5rem; }
.ra-xp--hive .ra-xp-title { justify-content: center; }
.ra-xp-hex {
    position: relative; display: grid; place-content: center; justify-items: center; gap: .25rem;
    width: 118px; height: 136px; padding: 0 .9rem; text-align: center; background: rgba(229, 57, 58, .55);
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    color: var(--ra-text) !important; font-size: .72rem; line-height: 1.2;
}
.ra-xp-hex::before { content: ""; position: absolute; inset: 2px; background: var(--ra-panel); clip-path: inherit; transition: background .15s; }
.ra-xp-hex > * { position: relative; }
.ra-xp-hex .iconify { width: 1.6rem; height: 1.6rem; color: var(--ra-cream); }
.ra-xp-hex:hover { background: var(--ra-red); color: var(--ra-cream) !important; }
.ra-xp-hex:hover::before { background: #1d1416; }
@media (max-width: 575.98px) { .ra-xp-hex { width: 98px; height: 113px; font-size: .64rem; padding: 0 .6rem; } }


/* ---------- Footer + back to top ---------- */
.ra-footer { margin-top: 2rem; background: linear-gradient(to top, rgba(229, 57, 58, .12), rgba(0, 0, 0, .5)); border-top: 1px solid rgba(255, 255, 255, .07); }
.ra-footer__inner {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem 1.5rem;
    max-width: 1320px; margin: 0 auto; padding: 1.1rem 1rem; font-size: .85rem; color: #7d7a76;
}
.ra-footer small { color: #4a4745; }
#btn-back-to-top {
    position: fixed; right: 1rem; bottom: 1rem; z-index: 1020; display: none; place-items: center;
    width: 46px; height: 46px; padding: 0; border: 0; border-radius: 10px; background: var(--ra-red);
    color: #fff; cursor: pointer; box-shadow: 0 6px 20px rgba(229, 57, 58, .4);
}
#btn-back-to-top.is-visible { display: grid; }
#btn-back-to-top svg { width: 22px; height: 22px; }


/* ---------- Users online grid/card ---------- */

/* Main Panel Container */
.asylum-card {
background: #0d0f12;
border: 1px solid rgba(138, 18, 18, 0.4);
border-radius: 8px;
padding: 16px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

/* Card Responsive Grid */
.patient-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
gap: 14px;
}

/* Individual Patient Card */
.patient-card {
background: #13161a;
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 6px;
padding: 12px;
display: flex;
flex-direction: column;
justify-content: space-between;
transition: all 0.2s ease-in-out;
}

.patient-card:hover {
transform: translateY(-2px);
background: #171b21;
border-color: rgba(230, 43, 43, 0.5);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 10px rgba(230, 43, 43, 0.2);
}

/* Card Header & Avatar */
.patient-card-header {
display: flex;
align-items: center;
gap: 12px;
}

.patient-avatar-wrap {
position: relative;
width: 44px;
height: 44px;
flex-shrink: 0;
}

.patient-avatar-wrap img {
width: 44px;
height: 44px;
border-radius: 5px;
object-fit: cover;
border: 1px solid rgba(255, 255, 255, 0.15);
background: #08090b;
}

/* Level Badge & Online Dot */
.patient-lvl-badge {
position: absolute;
top: -5px;
right: -5px;
background: #e62b2b;
color: #ffffff;
border: 1px solid #8a1212;
font-size: 8px;
font-weight: 700;
padding: 1px 4px;
border-radius: 4px;
line-height: 1;
}

.patient-online-dot {
position: absolute;
bottom: -2px;
right: -2px;
width: 9px;
height: 9px;
background-color: #22c55e;
border: 2px solid #13161a;
border-radius: 50%;
box-shadow: 0 0 6px rgba(34, 197, 94, 0.8);
}

.patient-meta {
min-width: 0;
flex: 1;
}

.patient-name {
font-weight: 700;
font-size: 13px;
text-decoration: none;
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.patient-name:hover {
text-decoration: underline;
}

/* Role Badges */
.patient-role-badge {
display: inline-block;
font-size: 8.5px;
font-weight: 700;
letter-spacing: 0.5px;
padding: 2px 6px;
border-radius: 3px;
margin-top: 3px;
border: 1px solid;
text-transform: uppercase;
}

.badge-owner       { background: rgba(37, 99, 235, 0.25); color: #60a5fa; border-color: #1d4ed8; }
.badge-admin       { background: rgba(75, 85, 99, 0.25);  color: #d1d5db; border-color: #4b5563; }
.badge-mod         { background: rgba(194, 65, 12, 0.25); color: #fb923c; border-color: #c2410c; }
.badge-entertainer { background: rgba(161, 98, 7, 0.25);  color: #facc15; border-color: #a16207; }
.badge-patient     { background: rgba(30, 41, 59, 0.4);   color: #94a3b8; border-color: #334155; }

/* Card Footer & Quick Actions */
.patient-card-footer {
margin-top: 10px;
padding-top: 8px;
border-top: 1px solid rgba(255, 255, 255, 0.05);
display: flex;
align-items: center;
justify-content: space-between;
}

.patient-time {
font-size: 11px;
color: #6b7280;
}

.text-emerald {
color: #22c55e;
}

.patient-actions {
display: flex;
gap: 4px;
}

.action-btn {
width: 24px;
height: 24px;
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 4px;
color: #9ca3af;
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.06);
text-decoration: none;
font-size: 10px;
transition: all 0.15s ease;
}

.action-btn:hover {
background: rgba(255, 255, 255, 0.12);
color: #ffffff;
border-color: rgba(255, 255, 255, 0.2);
}

.action-btn.action-attack:hover {
background: #8a1212;
color: #ffffff;
border-color: #e62b2b;
}

/* Staff Legend Box & Pills */
.staff-legend-card {
background: #0d0f12;
border: 1px solid rgba(255, 255, 255, 0.08);
}

.staff-legend-title {
font-size: 11px;
font-weight: 700;
color: #9ca3af;
letter-spacing: 0.5px;
}

.legend-pill {
font-size: 10.5px;
font-weight: 600;
padding: 3px 10px;
border-radius: 12px;
border: 1px solid;
display: inline-flex;
align-items: center;
gap: 6px;
}

.legend-pill .dot {
width: 5px;
height: 5px;
border-radius: 50%;
}

.pill-owner       { background: rgba(37, 99, 235, 0.2); color: #60a5fa; border-color: #1d4ed8; }
.pill-owner .dot  { background: #3b82f6; }
.pill-admin       { background: rgba(75, 85, 99, 0.2);  color: #d1d5db; border-color: #4b5563; }
.pill-admin .dot  { background: #9ca3af; }
.pill-mod         { background: rgba(194, 65, 12, 0.2); color: #fb923c; border-color: #c2410c; }
.pill-mod .dot    { background: #f97316; }
.pill-entertainer { background: rgba(161, 98, 7, 0.2);  color: #facc15; border-color: #a16207; }
.pill-entertainer .dot { background: #eab308; }
.pill-patient     { background: rgba(30, 41, 59, 0.3);  color: #94a3b8; border-color: #334155; }
.pill-patient .dot { background: #64748b; }

/***START STAMP CSS***/
@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:wght@700&display=swap');

.ink-stamp {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  padding: 2.5px 6px;
  text-decoration: none !important;
  background-color: rgba(12, 12, 15, 0.85);
  border-width: 1.5px;
  border-style: solid;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  user-select: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

/* Individual Stamp Colors & Subtle Organic Tilts */
.ink-stamp.stamp-blue {
  transform: rotate(-1deg);
  color: #4196e1;
  border-color: rgba(65, 150, 225, 0.7);
  box-shadow: 0 0 4px rgba(65, 150, 225, 0.12);
}

.ink-stamp.stamp-gold {
  transform: rotate(1.2deg);
  color: #e2ac1b;
  border-color: rgba(226, 172, 27, 0.7);
  box-shadow: 0 0 4px rgba(226, 172, 27, 0.12);
}

.ink-stamp.stamp-red {
  transform: rotate(-1.5deg);
  color: #e52e3d;
  border-color: rgba(229, 46, 61, 0.7);
  box-shadow: 0 0 4px rgba(229, 46, 61, 0.12);
}

.ink-stamp.stamp-steel {
  transform: rotate(-1deg);
  color: #a0a5b5;
  border-color: rgba(160, 165, 181, 0.6);
  box-shadow: 0 0 4px rgba(160, 165, 181, 0.12);
}
.ink-stamp.stamp-steel:hover {
  border-color: #a0a5b5;
  box-shadow: 0 0 8px rgba(160, 165, 181, 0.3);
}

/* Crisp Hover Effect (Flattens out like pressing a real stamp) */
.ink-stamp:hover {
  transform: scale(1.06) rotate(0deg) !important;
  background-color: rgba(255, 255, 255, 0.05);
  filter: brightness(1.2);
}

.ink-stamp.stamp-blue:hover { border-color: #4196e1; box-shadow: 0 0 8px rgba(65, 150, 225, 0.3); }
.ink-stamp.stamp-gold:hover { border-color: #e2ac1b; box-shadow: 0 0 8px rgba(226, 172, 27, 0.3); }
.ink-stamp.stamp-red:hover { border-color: #e52e3d; box-shadow: 0 0 8px rgba(229, 46, 61, 0.3); }

.ink-stamp:active {
  transform: scale(0.96) translateY(1px) !important;
}
@keyframes alert-pulse {
  0%, 100% {
    opacity: 1;
    text-shadow: 0 0 8px rgba(229, 46, 61, 0.8);
  }
  50% {
    opacity: 0.3;
    text-shadow: 0 0 2px rgba(229, 46, 61, 0.2);
  }
}

.asylum-flash-badge {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #e52e3d; /* Nerve Crimson Red */
  background: rgba(229, 46, 61, 0.1);
  border: 1px solid rgba(229, 46, 61, 0.4);
  padding: 1px 4px;
  border-radius: 2px;
  display: inline-block;
  animation: alert-pulse 1.2s infinite ease-in-out;
  text-transform: uppercase;
}
/***END STAMPS***/






/* === GYM V4 === */
#gym-v4{max-width:1120px;margin:0 auto;background:#0c0c0e;border:1px solid #1f1f1f;position:relative}
.gym-v4-header{border-left:3px solid #8b0000;border-bottom:2px solid #ffc107;padding:16px;background:#111113;text-align:center}
.gym-v4-title{letter-spacing:3px;font-size:14px;color:#e8e8e8} .gym-v4-title span{color:#ffc107}
.gym-v4-sub{font-size:10px;color:#666;margin-top:4px;letter-spacing:1px}
.gym-v4-label{font-size:10px;letter-spacing:2px;color:#555;padding:10px 14px;border-bottom:1px solid #1a1a1a;background:#0f0f11}
.gym-v4-label.red{color:#ff4444;border-left:3px solid #8b0000;background:#161011}
.gym-mem-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:10px;background:#0a0a0a}
.mem-file{background:#151517;border:1px solid #222;border-left:3px solid var(--c);padding:12px;position:relative}
.mem-file.is-active{border-color:#ffc107;box-shadow:0 0 12px rgba(255,193,7,.15)}
.mem-file-top{display:flex;justify-content:space-between;font-weight:900;font-size:12px;color:#ddd;letter-spacing:1px}
.mem-file-desc{font-size:11px;color:#666;margin:8px 0;min-height:28px}
.mem-file-meta{font-size:10px;color:#555}
.mem-file-active{margin-top:10px;border:1px dashed #ffc107;color:#ffc107;font-size:10px;padding:4px;text-align:center;letter-spacing:1px}
.mem-buy{margin-top:10px;width:100%;background:#0a0a0a;border:1px solid #333;color:#aaa;padding:7px;font-size:11px;letter-spacing:2px;transition:.2s}
.mem-buy:hover{border-color:var(--c);color:#fff;background:#1a1a1a}
.admin-folder{border:1px solid #222;background:#0e0e0e;margin-bottom:18px}
.admin-folder-tab{background:#111;border-bottom:1px solid #222;color:#ffc107;font-size:11px;letter-spacing:2px;padding:8px 12px;font-weight:900}
.admin-folder-body{padding:12px}
.admin-form{display:grid;grid-template-columns:1fr 1.5fr 90px 90px 80px 60px 120px;gap:6px}
.admin-form input{background:#151515;border:1px solid #222;border-bottom:2px solid #333;color:#ccc;padding:8px;font-size:12px}
.admin-form input:focus{border-bottom-color:#ffc107;outline:none}
.admin-save{background:#ffc107;color:#000;font-weight:900;border:0;padding:8px;letter-spacing:1px}
.admin-list{margin-top:12px;border-top:1px solid #1a1a1a}
.admin-row{display:grid;grid-template-columns:1fr 1fr 200px;gap:8px;padding:8px 0;border-bottom:1px solid #151515;font-size:12px;color:#888}
.a-edit{background:#1a1a1a;border:1px solid #333;color:#ffc107;padding:3px 8px;font-size:11px}
.a-del{background:#1a0a0a;border:1px solid #331a1a;color:#ff4444;padding:3px 8px;font-size:11px}
.gym-burn-console{display:grid;grid-template-columns:140px 1fr 180px;gap:0;background:#101010;border-top:1px solid #222;border-bottom:1px solid #222;align-items:center}
.burn-left{text-align:center;padding:14px;border-right:1px solid #222}
.burn-label{font-size:9px;color:#666;letter-spacing:2px} .burn-val{font-size:28px;font-weight:900;color:#ffc107;line-height:1}
.burn-center{padding:12px 18px} #gym-energy-slider{width:100%;accent-color:#ffc107;height:4px}
.burn-presets{display:flex;gap:6px;margin-top:8px} .burn-presets button{background:#1a1a1a;border:1px solid #2a2a2a;color:#777;font-size:11px;padding:4px 10px} .burn-presets button.is-max{background:#ffc107;color:#000;font-weight:900}
.burn-right{padding:12px;border-left:1px solid #222;font-size:10px;color:#555;text-align:right;line-height:1.3}
.pit-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;background:#1f1f1f}
.pit-station{position:relative;background:#121214;padding:28px 18px 18px;min-height:300px;overflow:hidden}
.pit-num{position:absolute;top:10px;right:12px;font-size:42px;font-weight:900;color:#1e1e20;line-height:1}
.pit-bar{position:absolute;left:0;top:0;bottom:0;width:3px;background:#222}
.s-strength .pit-bar{background:#ffc107} .s-speed .pit-bar{background:#00d4ff} .s-defense .pit-bar{background:#00ff88}
.pit-station h3{font-size:13px;letter-spacing:4px;color:#888;margin:0}
.pit-stat{font-size:32px;font-weight:900;letter-spacing:-1px;color:#e8e8e8;margin:10px 0;line-height:1}
.s-strength .pit-stat{color:#ffc107} .s-speed .pit-stat{color:#00d4ff} .s-defense .pit-stat{color:#00ff88}
.pit-station p{font-size:11px;color:#555;min-height:32px;margin:0}
.pit-btn{margin-top:18px;width:100%;background:#0a0a0a;border:1px solid #2a2a2a;color:#aaa;padding:12px 0;font-weight:900;letter-spacing:3px;font-size:12px;position:relative;overflow:hidden;transition:.15s}
.pit-btn:after{content:'';position:absolute;left:0;top:0;bottom:0;width:0;background:#ffc107;transition:.25s;z-index:1}
.s-speed .pit-btn:after{background:#00d4ff} .s-defense .pit-btn:after{background:#00ff88}
.pit-btn span{position:relative;z-index:2}
.pit-btn:hover{color:#000;border-color:transparent} .pit-btn:hover:after{width:100%}
#gym-toast{position:fixed;bottom:18px;left:50%;transform:translateX(-50%);z-index:9999}
#gym-toast .toast-msg{background:#0e0e0e;border-left:3px solid #ffc107;border-top:1px solid #222;padding:10px 14px;margin-top:6px;font-size:12px;color:#ddd;min-width:260px;box-shadow:0 10px 30px rgba(0,0,0,.8)}
@media(max-width:800px){.gym-mem-grid,.pit-grid,.gym-burn-console{grid-template-columns:1fr} .admin-form{grid-template-columns:1fr 1fr}}
#gym-toast .toast-msg.success{border-left-color:#00ff88 !important;background:#0a1a12 !important;color:#00ff88 !important;box-shadow:0 0 20px rgba(0,255,136,.25)}
#gym-toast .toast-msg.error{border-left-color:#ff4444 !important;background:#1a0a0a !important;color:#ff8888 !important}
.admin-brief{border:1px dashed #2a2a1a;background:#0e0e0b;margin-bottom:14px;padding:0}
.brief-header{background:#15150e;border-bottom:1px dashed #2a2a1a;color:#ffc107;font-size:10px;letter-spacing:2px;padding:7px 10px;font-weight:900}
.brief-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;background:#1e1e16}
.brief-item{background:#12120e;padding:10px 12px}
.brief-item b{display:block;color:#e8e8e8;font-size:11px;letter-spacing:1px;margin-bottom:4px}
.brief-item span{display:block;color:#777;font-size:11px;line-height:1.4}
.brief-item code{background:#1a1a12;border:1px solid #2a2a1a;color:#ffc107;padding:1px 4px;font-size:10px}
.brief-example{padding:8px 12px;font-size:11px;color:#666;border-top:1px dashed #2a2a1a;background:#0f0f0a}
.brief-example b{color:#aaa}
@media(max-width:800px){.brief-grid{grid-template-columns:1fr}}