body.ibiza-system-body {
    min-height: 100dvh;
    padding-top: 76px !important;
    overflow-x: hidden;
    overflow-y: auto;
    color: #f7efff;
    background: #100518;
    font-family: Roboto, Arial, sans-serif;
    --black: #100518;
    --stone-900: #14081e;
    --stone-800: #1d0d2f;
    --stone-700: #2a1244;
    --silver: #f7efff;
    --silver-dim: rgba(247, 239, 255, .74);
    --red: #ff2f68;
    --red-bright: #ff5b86;
    --gold: #ffae42;
    --gold-soft: #ffe08b;
    --green: #65f0b7;
    --blue-steel: #98d8ff;
    --line: rgba(255, 224, 139, .22);
    --line-strong: rgba(255, 224, 139, .42);
    --shadow: 0 28px 80px rgba(0, 0, 0, .5);
    --font-display: Gambarino, Merriweather, Georgia, serif;
    --font-serif: Merriweather, Georgia, serif;
    --font-ui: Roboto, Arial, sans-serif;
}

body.ibiza-system-body .page-bg {
    z-index: 0;
    background: #100518;
}

body.ibiza-system-body .page-bg__image {
    background: url("../img/ibizabg.webp") center top / cover no-repeat;
    opacity: .82;
    filter: saturate(1.08) contrast(1.04) brightness(.72);
    transform: none;
}

body.ibiza-system-body .page-bg__stained {
    opacity: .72;
    background:
        radial-gradient(circle at 50% 18%, rgba(255, 174, 66, .22), transparent 22rem),
        radial-gradient(circle at 82% 14%, rgba(255, 47, 104, .2), transparent 18rem),
        linear-gradient(180deg, rgba(16, 5, 24, .12), rgba(16, 5, 24, .86));
}

body.ibiza-system-body .page-bg::before,
body.ibiza-system-body .page-bg::after {
    content: "";
    position: fixed;
    pointer-events: none;
    z-index: 1;
    opacity: .78;
    mix-blend-mode: screen;
}

body.ibiza-system-body .page-bg::before {
    inset: -12vh -8vw auto auto;
    width: min(620px, 78vw);
    height: min(620px, 78vw);
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 35%, rgba(255, 224, 139, .34), transparent 0 18%),
        radial-gradient(circle at 54% 48%, rgba(255, 47, 104, .24), transparent 0 36%),
        radial-gradient(circle at 62% 62%, rgba(123, 66, 246, .36), transparent 0 58%);
    filter: blur(24px);
    animation: ibizaSystemLightDrift 12s ease-in-out infinite alternate;
}

body.ibiza-system-body .page-bg::after {
    left: -14vw;
    bottom: -24vh;
    width: min(720px, 88vw);
    height: min(720px, 88vw);
    border-radius: 50%;
    background:
        radial-gradient(circle at 48% 42%, rgba(123, 66, 246, .42), transparent 0 34%),
        radial-gradient(circle at 54% 58%, rgba(255, 174, 66, .2), transparent 0 58%);
    filter: blur(34px);
    animation: ibizaSystemLightPulse 9s ease-in-out infinite alternate;
}

body.ibiza-system-body .page-bg__vignette {
    background:
        linear-gradient(180deg, rgba(12, 3, 18, .32), rgba(12, 3, 18, .86)),
        radial-gradient(circle at center, transparent 0 42%, rgba(0, 0, 0, .62) 100%);
}

.ibiza-system-navbar {
    position: fixed !important;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1200;
    min-height: 76px;
    border-bottom: 1px solid rgba(255, 224, 139, .22);
    background:
        linear-gradient(180deg, rgba(26, 11, 46, .99), rgba(20, 7, 32, .95)),
        rgba(16, 5, 24, .98) !important;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .52);
    backdrop-filter: blur(14px);
}

body.ibiza-system-body > .ibiza-system-navbar {
    z-index: 1200 !important;
}

.ibiza-system-navbar .container {
    gap: 14px;
}

.ibiza-system-navbar .navbar-brand {
    display: inline-flex;
    align-items: center;
    padding: 0;
}

.ibiza-system-navbar .navbar-brand img {
    width: 76px;
    max-height: 62px;
    object-fit: contain;
    filter: drop-shadow(0 0 18px rgba(123, 66, 246, .58));
}

.ibiza-system-navbar .navbar-toggler {
    border: 1px solid rgba(255, 224, 139, .38) !important;
    border-radius: 10px;
    background: rgba(8, 4, 12, .46);
    box-shadow: 0 0 18px rgba(123, 66, 246, .26);
}

.ibiza-system-navbar .navbar-toggler:focus {
    box-shadow: 0 0 0 .18rem rgba(255, 174, 66, .22);
}

.ibiza-system-navbar .navbar-toggler-icon {
    background-image: url("../img/menu.webp") !important;
    background-size: 24px 24px;
}

.ibiza-system-navbar .nav-link {
    position: relative;
    color: rgba(247, 239, 255, .88) !important;
    font-size: .9rem;
    font-weight: 900;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .48);
    transition: color .18s ease, transform .18s ease;
}

.ibiza-system-navbar .nav-link:hover,
.ibiza-system-navbar .nav-link.active {
    color: #ffe08b !important;
    transform: translateY(-1px);
}

.ibiza-system-navbar .nav-link.active::after {
    content: "";
    position: absolute;
    right: .55rem;
    bottom: .2rem;
    left: .55rem;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, #ffae42, transparent);
}

.ibiza-system-account .nav-link strong {
    color: #ffe08b;
}

.ibiza-system-wrap {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0 86px;
}

.ibiza-system-mast {
    min-height: 330px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    padding: 28px 0 24px;
    text-align: center;
}

@keyframes ibizaSystemLightDrift {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }
    to {
        transform: translate3d(-4vw, 5vh, 0) scale(1.08);
    }
}

@keyframes ibizaSystemLightPulse {
    from {
        opacity: .48;
        transform: translate3d(0, 0, 0) scale(.94);
    }
    to {
        opacity: .78;
        transform: translate3d(5vw, -3vh, 0) scale(1.06);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.ibiza-system-body .page-bg::before,
    body.ibiza-system-body .page-bg::after {
        animation: none;
    }
}

.ibiza-system-logo-link {
    display: inline-grid;
    place-items: center;
}

.ibiza-system-logo-link img {
    width: min(420px, 78vw);
    max-height: 250px;
    object-fit: contain;
    filter: drop-shadow(0 18px 28px rgba(0, 0, 0, .7)) drop-shadow(0 0 32px rgba(123, 66, 246, .38));
}

.ibiza-system-mast span {
    color: #ffe08b;
    font-weight: 900;
    text-transform: uppercase;
}

.ibiza-system-mast h1 {
    margin: 0;
    color: #fff;
    font-family: Gambarino, Merriweather, Georgia, serif;
    font-size: 3rem;
    line-height: 1;
    text-shadow: 0 4px 22px rgba(0, 0, 0, .62);
    text-transform: uppercase;
}

.ibiza-system-shell {
    overflow: hidden;
    border: 1px solid rgba(255, 224, 139, .28);
    border-radius: 18px;
    background:
        linear-gradient(140deg, rgba(123, 66, 246, .12), transparent 34%),
        rgba(12, 4, 20, .82);
    box-shadow: 0 32px 90px rgba(0, 0, 0, .48);
    backdrop-filter: blur(12px);
}

.ibiza-system-shell__bar {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 224, 139, .2);
    color: #ffe08b;
    background:
        linear-gradient(90deg, rgba(255, 47, 104, .2), rgba(123, 66, 246, .2)),
        rgba(15, 5, 24, .92);
    text-transform: uppercase;
}

.ibiza-system-shell__content {
    padding: clamp(18px, 3vw, 34px);
}

.ibiza-system-body .system-main,
.ibiza-system-body .admin-shell {
    min-height: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.ibiza-system-body .system-hero {
    max-width: none;
    margin: 0 0 22px;
    padding: clamp(18px, 3vw, 30px);
    border: 1px solid rgba(255, 224, 139, .26);
    border-radius: 16px;
    background:
        linear-gradient(125deg, rgba(255, 47, 104, .16), transparent 38%),
        rgba(18, 7, 30, .86);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .34);
}

.ibiza-system-body .system-hero h1,
.ibiza-system-body .admin-head h1,
.ibiza-system-body .admin-guard h1,
.ibiza-system-body .ibiza-info-panel h1 {
    color: #fff;
    font-family: Gambarino, Merriweather, Georgia, serif;
    font-size: 3rem;
    line-height: 1;
    text-transform: uppercase;
    text-shadow: 0 4px 18px rgba(0, 0, 0, .54);
}

.ibiza-system-body .system-hero p,
.ibiza-system-body .admin-head p,
.ibiza-system-body .admin-panel__head p,
.ibiza-system-body .ibiza-info-panel p {
    color: rgba(247, 239, 255, .76);
    font-family: Roboto, Arial, sans-serif;
    font-size: 1rem;
}

.ibiza-system-body .eyebrow {
    color: #ff8fb0;
    font-weight: 900;
    text-transform: uppercase;
}

.ibiza-system-body .system-panel,
.ibiza-system-body .wallet-panel,
.ibiza-system-body .profile-panel,
.ibiza-system-body .profile-rail,
.ibiza-system-body .market-card,
.ibiza-system-body .shop-card,
.ibiza-system-body .castle-panel,
.ibiza-system-body .character-card,
.ibiza-system-body .admin-panel,
.ibiza-system-body .admin-guard,
.ibiza-system-body .ibiza-info-panel {
    border: 1px solid rgba(255, 224, 139, .24);
    border-radius: 14px;
    background:
        linear-gradient(145deg, rgba(123, 66, 246, .15), transparent 42%),
        rgba(17, 6, 28, .88);
    box-shadow: 0 20px 56px rgba(0, 0, 0, .38);
}

.ibiza-system-body .system-panel,
.ibiza-system-body .ibiza-info-panel {
    max-width: none;
    margin: 0;
}

.ibiza-system-body .wallet-grid span,
.ibiza-system-body .profile-stats span,
.ibiza-system-body .castle-grid span,
.ibiza-system-body .profile-stat-board span,
.ibiza-system-body .option-row label,
.ibiza-system-body .shop-card__price {
    border-color: rgba(255, 224, 139, .18);
    background: rgba(255, 255, 255, .055);
}

.ibiza-system-body .wallet-grid b,
.ibiza-system-body .profile-stats b,
.ibiza-system-body .castle-grid b,
.ibiza-system-body .profile-stat-board b,
.ibiza-system-body .market-card__price,
.ibiza-system-body .shop-card__price,
.ibiza-system-body .system-message {
    color: #ffe08b;
}

.ibiza-system-body .button,
.ibiza-system-body button.button,
.ibiza-system-body .tab,
.ibiza-system-body .system-tab,
.ibiza-system-body .admin-tab {
    min-height: 42px;
    border-radius: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.ibiza-system-body .button--gold,
.ibiza-system-body .button--primary,
.ibiza-system-body .tab.is-active,
.ibiza-system-body .system-tab.is-active,
.ibiza-system-body .admin-tab.is-active {
    border-color: rgba(255, 224, 139, .7);
    color: #1a0b2e;
    background: linear-gradient(180deg, #ffe08b, #ffae42);
    box-shadow: 0 10px 24px rgba(255, 174, 66, .22);
}

.ibiza-system-body .button--ghost,
.ibiza-system-body .tab,
.ibiza-system-body .system-tab,
.ibiza-system-body .admin-tab {
    border: 1px solid rgba(255, 224, 139, .24);
    color: #f7efff;
    background: rgba(255, 255, 255, .055);
}

.ibiza-system-body input,
.ibiza-system-body select,
.ibiza-system-body textarea {
    min-height: 44px;
    border: 1px solid rgba(255, 224, 139, .28);
    border-radius: 10px;
    color: #fff;
    background: rgba(9, 3, 16, .78);
}

.ibiza-system-body select {
    color-scheme: dark;
}

.ibiza-system-body select option {
    color: #fff;
    background: #12071f;
}

.ibiza-system-body input:focus,
.ibiza-system-body select:focus,
.ibiza-system-body textarea:focus {
    outline: none;
    border-color: rgba(255, 174, 66, .78);
    box-shadow: 0 0 0 .18rem rgba(255, 174, 66, .14);
}

.ibiza-system-body .profile-layout {
    grid-template-columns: minmax(280px, .8fr) minmax(420px, 1.2fr);
}

.ibiza-system-body .profile-character img {
    width: 58px;
    height: 58px;
}

.ibiza-system-body .equipment-board {
    max-width: min(380px, 100%);
    background-color: rgba(6, 2, 12, .62);
}

.ibiza-system-body .equipment-slot {
    box-shadow: none;
}

.ibiza-system-body .equipment-board [data-mu-item-icon] {
    max-width: 82%;
    max-height: 82%;
    object-fit: contain;
}

.ibiza-system-body .modal {
    width: min(92vw, 440px);
    border: 0;
    padding: 0;
    color: #fff;
    background: transparent;
}

.ibiza-system-body .modal::backdrop {
    background: rgba(0, 0, 0, .72);
}

.ibiza-system-body .modal__panel {
    position: relative;
    display: grid;
    gap: 14px;
    padding: 26px;
    border: 1px solid rgba(255, 224, 139, .38);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(26, 11, 46, .98), rgba(8, 5, 14, .98));
    box-shadow: 0 24px 70px rgba(0, 0, 0, .65);
}

.ibiza-system-body .modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    color: #fff;
    background: transparent;
    font-size: 22px;
}

.ibiza-system-body .tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.ibiza-system-body .auth-form {
    display: none;
    gap: 10px;
}

.ibiza-system-body .auth-form.is-active {
    display: grid;
}

.ibiza-system-body .auth-form label,
.ibiza-system-body .admin-grid label,
.ibiza-system-body .sell-form label {
    display: grid;
    gap: 6px;
    color: rgba(247, 239, 255, .78);
    font-size: .86rem;
    font-weight: 900;
    text-transform: uppercase;
}

.ibiza-system-body .download-option {
    border-color: rgba(255, 224, 139, .28);
    background: rgba(255, 255, 255, .055);
}

.ibiza-system-body [data-mu-tooltip] {
    cursor: help;
}

.ibiza-system-body .nicolas-credit {
    z-index: 2147483647;
}

@media (max-width: 991.98px) {
    body.ibiza-system-body {
        padding-top: 68px !important;
    }

    .ibiza-system-navbar {
        min-height: 68px;
    }

    .ibiza-system-navbar .navbar-brand img {
        width: 62px;
        max-height: 52px;
    }

    .ibiza-system-navbar .navbar-collapse {
        margin-top: 12px;
        padding: 12px;
        border: 1px solid rgba(255, 224, 139, .22);
        border-radius: 14px;
        background: rgba(12, 4, 20, .94);
    }

    .ibiza-system-navbar .nav-link {
        min-height: 42px;
        display: flex;
        align-items: center;
    }

    .ibiza-system-wrap {
        width: min(100% - 18px, 760px);
        padding-top: 14px;
    }

    .ibiza-system-mast {
        min-height: 200px;
    }

    .ibiza-system-mast h1 {
        font-size: 2.2rem;
    }

    .ibiza-system-shell__content {
        padding: 14px;
    }

    .ibiza-system-body .system-hero {
        grid-template-columns: 1fr;
    }

    .ibiza-system-body .system-hero h1,
    .ibiza-system-body .admin-head h1,
    .ibiza-system-body .admin-guard h1,
    .ibiza-system-body .ibiza-info-panel h1 {
        font-size: 2.1rem;
    }

    .ibiza-system-body .profile-layout,
    .ibiza-system-body .equipment-showcase,
    .ibiza-system-body .admin-head {
        grid-template-columns: 1fr;
        display: grid;
    }

    .ibiza-system-body .wallet-grid,
    .ibiza-system-body .profile-stats,
    .ibiza-system-body .castle-grid,
    .ibiza-system-body .profile-stat-board {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .ibiza-system-wrap {
        width: calc(100% - 12px);
    }

    .ibiza-system-logo-link img {
        width: min(300px, 84vw);
    }

    .ibiza-system-shell {
        border-radius: 14px;
    }

    .ibiza-system-body .system-hero,
    .ibiza-system-body .system-panel,
    .ibiza-system-body .wallet-panel,
    .ibiza-system-body .profile-panel,
    .ibiza-system-body .admin-panel,
    .ibiza-system-body .admin-guard,
    .ibiza-system-body .ibiza-info-panel {
        padding: 14px;
    }

    .ibiza-system-body .wallet-grid,
    .ibiza-system-body .profile-stats,
    .ibiza-system-body .castle-grid,
    .ibiza-system-body .profile-stat-board,
    .ibiza-system-body .shop-grid,
    .ibiza-system-body .market-grid,
    .ibiza-system-body .characters-grid,
    .ibiza-system-body .warehouse-grid {
        grid-template-columns: 1fr;
    }

    .ibiza-system-body .option-row label.shop-select-field {
        grid-template-columns: 1fr;
    }

    .ibiza-system-body .equipment-showcase {
        gap: 14px;
    }

    .ibiza-system-body .equipment-board {
        width: min(100%, 360px);
    }

body.ibiza-system-body > a.nicolas-credit[data-nx-credit] {
        position: static !important;
        width: max-content;
        max-width: calc(100% - 20px);
        margin: 18px max(10px, env(safe-area-inset-right)) 12px auto;
    }
}

/* Ibiza webshop: keep dense MU options readable inside product cards. */
.ibiza-system-body .shop-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
    align-items: start;
}

.ibiza-system-body .shop-card {
    min-width: 0;
}

.ibiza-system-body .shop-card .system-form {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.ibiza-system-body .shop-card .option-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
}

.ibiza-system-body .shop-card .option-row[data-shop-exc] {
    grid-template-columns: 1fr;
}

.ibiza-system-body .shop-card .option-row label {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.ibiza-system-body .shop-card .option-row label.shop-select-field {
    display: grid;
    grid-template-columns: minmax(58px, .7fr) minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
}

.ibiza-system-body .shop-card .shop-select-field span,
.ibiza-system-body .shop-card .shop-check-field span,
.ibiza-system-body .shop-card .shop-excellent-field span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ibiza-system-body .shop-card .shop-select-field select,
.ibiza-system-body .shop-card .shop-select-field input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding-inline: 10px;
}

.ibiza-system-body .shop-card .option-row label.shop-check-field,
.ibiza-system-body .shop-card .option-row label.shop-excellent-field {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: start;
}

.ibiza-system-body .shop-card .shop-check-field input,
.ibiza-system-body .shop-card .shop-excellent-field input {
    width: 22px;
    min-width: 22px;
    height: 22px;
    min-height: 22px;
}

.ibiza-system-body .shop-card .shop-excellent-field small {
    grid-column: 2;
    min-width: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 430px) {
    .ibiza-system-body .shop-card .option-row {
        grid-template-columns: 1fr;
    }

    .ibiza-system-body .shop-card .option-row label.shop-select-field {
        grid-template-columns: minmax(76px, .55fr) minmax(0, 1fr);
    }
}

/* Ibiza Castle Siege: Assassins layout recolored for Ibiza. */
body.ibiza-system-body[data-system-page="castle"] .ibiza-system-shell__content {
    padding: clamp(14px, 2.4vw, 28px);
}

body.ibiza-system-body[data-system-page="castle"] [data-mu-castle],
body.ibiza-system-body[data-system-page="castle"] [data-templare-castle],
body.ibiza-system-body[data-system-page="castle"] [data-Comeback-castle] {
    display: grid;
    gap: clamp(16px, 2vw, 24px);
}

body.ibiza-system-body[data-system-page="castle"] .siege-loren,
body.ibiza-system-body[data-system-page="castle"] .siege-next-panel,
body.ibiza-system-body[data-system-page="castle"] .siege-guilds-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 224, 139, .28);
    border-radius: 18px;
    background:
        radial-gradient(circle at 14% 18%, rgba(255, 47, 104, .24), transparent 28rem),
        radial-gradient(circle at 86% 0%, rgba(123, 66, 246, .28), transparent 26rem),
        linear-gradient(145deg, rgba(42, 18, 68, .94), rgba(9, 3, 16, .96));
    box-shadow:
        0 28px 74px rgba(0, 0, 0, .52),
        inset 0 1px 0 rgba(255, 255, 255, .06);
    backdrop-filter: blur(12px);
}

body.ibiza-system-body[data-system-page="castle"] .siege-loren::after,
body.ibiza-system-body[data-system-page="castle"] .siege-next-panel::after,
body.ibiza-system-body[data-system-page="castle"] .siege-guilds-panel::after {
    content: "";
    position: absolute;
    top: 0;
    right: 10%;
    left: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 174, 66, .82), transparent);
    opacity: .76;
    pointer-events: none;
}

body.ibiza-system-body[data-system-page="castle"] .siege-loren {
    min-height: clamp(320px, 36vw, 430px);
    display: grid;
    grid-template-columns: minmax(190px, .38fr) minmax(0, .62fr);
    align-items: center;
    gap: clamp(18px, 4vw, 50px);
    padding: clamp(22px, 4vw, 48px);
    isolation: isolate;
}

body.ibiza-system-body[data-system-page="castle"] .siege-loren::before {
    content: "";
    position: absolute;
    inset: auto -12% -38% 22%;
    height: 72%;
    background:
        radial-gradient(ellipse at 50% 42%, rgba(255, 224, 139, .2), transparent 0 34%),
        radial-gradient(ellipse at 50% 58%, rgba(255, 47, 104, .18), transparent 0 58%);
    filter: blur(22px);
    opacity: .9;
    pointer-events: none;
    z-index: 0;
}

body.ibiza-system-body[data-system-page="castle"] .siege-loren__glare {
    position: absolute;
    inset: -44% auto auto -12%;
    width: min(520px, 78vw);
    height: min(520px, 78vw);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 224, 139, .22), rgba(255, 47, 104, .12) 32%, transparent 66%);
    filter: blur(18px);
    opacity: .78;
    pointer-events: none;
    z-index: 0;
}

body.ibiza-system-body[data-system-page="castle"] .siege-loren__mark {
    position: relative;
    z-index: 1;
    width: min(245px, 100%);
    aspect-ratio: 1;
    margin-inline: auto;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 224, 139, .36);
    border-radius: 24px;
    background:
        radial-gradient(circle at 50% 34%, rgba(255, 224, 139, .2), transparent 0 34%),
        linear-gradient(145deg, rgba(20, 5, 30, .92), rgba(5, 1, 10, .96));
    box-shadow:
        0 24px 52px rgba(0, 0, 0, .58),
        0 0 34px rgba(123, 66, 246, .34),
        inset 0 0 28px rgba(255, 47, 104, .1);
    transform: translateZ(20px);
}

body.ibiza-system-body[data-system-page="castle"] .siege-loren__mark::before {
    content: "";
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(255, 174, 66, .22);
    border-radius: 18px;
    box-shadow: inset 0 0 24px rgba(0, 0, 0, .42);
    pointer-events: none;
}

body.ibiza-system-body[data-system-page="castle"] .siege-loren__mark-img,
body.ibiza-system-body[data-system-page="castle"] .siege-loren__mark-empty {
    width: 66%;
    height: 66%;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 16px 20px rgba(0, 0, 0, .62)) drop-shadow(0 0 18px rgba(255, 174, 66, .34));
}

body.ibiza-system-body[data-system-page="castle"] .siege-loren__mark-empty {
    display: grid;
    place-items: center;
    color: rgba(255, 224, 139, .82);
}

body.ibiza-system-body[data-system-page="castle"] .siege-loren__mark-empty svg {
    width: 92px;
    height: 92px;
    stroke-width: 1.35;
}

body.ibiza-system-body[data-system-page="castle"] .siege-loren__crown {
    position: absolute;
    top: -26px;
    left: 50%;
    z-index: 2;
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    transform: translateX(-50%);
    color: #ffe08b;
    border: 1px solid rgba(255, 224, 139, .46);
    border-radius: 50%;
    background: radial-gradient(circle at 50% 35%, rgba(255, 174, 66, .4), rgba(34, 8, 44, .94) 68%);
    box-shadow:
        0 0 28px rgba(255, 174, 66, .42),
        0 12px 26px rgba(0, 0, 0, .5);
}

body.ibiza-system-body[data-system-page="castle"] .siege-loren__crown svg {
    width: 28px;
    height: 28px;
}

body.ibiza-system-body[data-system-page="castle"] .siege-loren__info {
    position: relative;
    z-index: 1;
    min-width: 0;
}

body.ibiza-system-body[data-system-page="castle"] .siege-loren__info .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #ff8fb0;
    font-family: var(--font-ui);
    font-size: .76rem;
    font-weight: 1000;
    letter-spacing: .16em;
    text-transform: uppercase;
    text-shadow: 0 0 14px rgba(255, 47, 104, .44);
}

body.ibiza-system-body[data-system-page="castle"] .siege-loren__info .eyebrow svg {
    width: 18px;
    height: 18px;
}

body.ibiza-system-body[data-system-page="castle"] .siege-loren h2 {
    margin: 0;
    color: #fff;
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 7vw, 5.35rem);
    line-height: .98;
    letter-spacing: 0;
    text-shadow:
        0 0 24px rgba(255, 47, 104, .42),
        0 7px 12px rgba(0, 0, 0, .58);
    overflow-wrap: anywhere;
}

body.ibiza-system-body[data-system-page="castle"] .siege-loren p {
    margin: 14px 0 0;
    color: rgba(247, 239, 255, .82);
    font-weight: 900;
}

body.ibiza-system-body[data-system-page="castle"] .siege-loren p span {
    color: #ffe08b;
}

body.ibiza-system-body[data-system-page="castle"] .siege-loren__stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 22px;
}

body.ibiza-system-body[data-system-page="castle"] .siege-loren__stats span {
    min-width: 0;
    min-height: 84px;
    display: grid;
    align-content: center;
    gap: 5px;
    padding: 14px;
    border: 1px solid rgba(255, 224, 139, .2);
    border-radius: 14px;
    background: rgba(0, 0, 0, .34);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

body.ibiza-system-body[data-system-page="castle"] .siege-loren__stats small {
    color: #ff8fb0;
    font-size: .7rem;
    font-weight: 1000;
    letter-spacing: .12em;
    text-transform: uppercase;
}

body.ibiza-system-body[data-system-page="castle"] .siege-loren__stats b {
    min-width: 0;
    color: #ffe08b;
    font-family: var(--font-serif);
    font-size: clamp(1rem, 1.8vw, 1.35rem);
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 0 12px rgba(255, 174, 66, .28);
}

body.ibiza-system-body[data-system-page="castle"] .siege-next-panel,
body.ibiza-system-body[data-system-page="castle"] .siege-guilds-panel {
    padding: clamp(18px, 3vw, 32px);
}

body.ibiza-system-body[data-system-page="castle"] .siege-next-panel {
    display: grid;
    grid-template-columns: minmax(250px, .36fr) minmax(0, .64fr);
    align-items: stretch;
    gap: 18px;
}

body.ibiza-system-body[data-system-page="castle"] .siege-timer-frame {
    min-height: 192px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    padding: 22px;
    text-align: center;
    border: 1px solid rgba(255, 224, 139, .3);
    border-radius: 16px;
    background:
        radial-gradient(circle at 50% 10%, rgba(255, 174, 66, .17), transparent 0 48%),
        linear-gradient(160deg, rgba(12, 2, 22, .9), rgba(0, 0, 0, .46));
    box-shadow:
        inset 0 0 28px rgba(0, 0, 0, .4),
        0 18px 36px rgba(0, 0, 0, .32);
}

body.ibiza-system-body[data-system-page="castle"] .siege-timer-frame span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #ff8fb0;
    font-size: .78rem;
    font-weight: 1000;
    letter-spacing: .13em;
    text-transform: uppercase;
}

body.ibiza-system-body[data-system-page="castle"] .siege-timer-frame span svg {
    width: 18px;
    height: 18px;
}

body.ibiza-system-body[data-system-page="castle"] .siege-timer-frame strong {
    color: #ffe08b;
    font-family: var(--font-ui);
    font-size: clamp(1.75rem, 4.7vw, 4rem);
    font-weight: 1000;
    line-height: 1;
    letter-spacing: .08em;
    text-shadow:
        0 0 20px rgba(255, 174, 66, .38),
        0 5px 10px rgba(0, 0, 0, .55);
}

body.ibiza-system-body[data-system-page="castle"] .siege-timer-frame strong.is-live {
    color: #ff5b86;
    text-shadow:
        0 0 24px rgba(255, 47, 104, .7),
        0 5px 10px rgba(0, 0, 0, .55);
    animation: ibizaSiegePulse 1s ease-in-out infinite alternate;
}

@keyframes ibizaSiegePulse {
    from { transform: scale(1); }
    to { transform: scale(1.035); }
}

body.ibiza-system-body[data-system-page="castle"] .siege-roadmap {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

body.ibiza-system-body[data-system-page="castle"] .siege-step {
    min-width: 0;
    min-height: 152px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 12px;
    padding: 16px 12px;
    text-align: center;
    border: 1px solid rgba(255, 224, 139, .2);
    border-radius: 15px;
    background: rgba(255, 255, 255, .055);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .04),
        0 14px 26px rgba(0, 0, 0, .26);
}

body.ibiza-system-body[data-system-page="castle"] .siege-step > svg {
    width: 36px;
    height: 36px;
    color: #ffe08b;
    filter: drop-shadow(0 0 14px rgba(255, 174, 66, .36));
}

body.ibiza-system-body[data-system-page="castle"] .siege-step.is-active {
    border-color: rgba(255, 224, 139, .5);
    background:
        radial-gradient(circle at 50% 18%, rgba(255, 224, 139, .16), transparent 0 46%),
        rgba(255, 255, 255, .07);
}

body.ibiza-system-body[data-system-page="castle"] .siege-step.is-war {
    border-color: rgba(255, 47, 104, .5);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .04),
        0 0 24px rgba(255, 47, 104, .16);
}

body.ibiza-system-body[data-system-page="castle"] .siege-step span {
    min-width: 0;
    display: grid;
    gap: 4px;
    color: #fff;
    font-size: .88rem;
    font-weight: 1000;
    text-transform: uppercase;
}

body.ibiza-system-body[data-system-page="castle"] .siege-step small {
    color: rgba(247, 239, 255, .66);
    font-size: .78rem;
    font-weight: 800;
    text-transform: none;
}

body.ibiza-system-body[data-system-page="castle"] .siege-panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

body.ibiza-system-body[data-system-page="castle"] .siege-panel-title span {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #ffe08b;
    font-weight: 1000;
    letter-spacing: .12em;
    text-transform: uppercase;
}

body.ibiza-system-body[data-system-page="castle"] .siege-panel-title svg {
    width: 20px;
    height: 20px;
    color: #ff8fb0;
}

body.ibiza-system-body[data-system-page="castle"] .siege-panel-title small {
    color: #ff8fb0;
    font-weight: 900;
}

body.ibiza-system-body[data-system-page="castle"] .siege-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(255, 224, 139, .2);
    border-radius: 14px;
    background: rgba(0, 0, 0, .18);
}

body.ibiza-system-body[data-system-page="castle"] .siege-guild-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
}

body.ibiza-system-body[data-system-page="castle"] .siege-guild-table th {
    padding: 15px 16px;
    color: #ff8fb0;
    font-size: .78rem;
    font-weight: 1000;
    letter-spacing: .12em;
    text-align: left;
    text-transform: uppercase;
    background: linear-gradient(90deg, rgba(16, 4, 24, .86), rgba(42, 18, 68, .9), rgba(16, 4, 24, .86));
    border-bottom: 1px solid rgba(255, 174, 66, .32);
}

body.ibiza-system-body[data-system-page="castle"] .siege-guild-table td {
    padding: 15px 16px;
    color: rgba(247, 239, 255, .84);
    border-top: 1px dashed rgba(255, 224, 139, .12);
}

body.ibiza-system-body[data-system-page="castle"] .siege-guild-table tr:hover td {
    color: #fff;
    background: rgba(255, 47, 104, .07);
}

body.ibiza-system-body[data-system-page="castle"] .siege-rank,
body.ibiza-system-body[data-system-page="castle"] .siege-marks {
    color: #ffe08b !important;
    font-weight: 1000;
    text-shadow: 0 0 12px rgba(255, 174, 66, .26);
}

body.ibiza-system-body[data-system-page="castle"] .siege-guild-name {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: #fff;
    font-weight: 1000;
}

body.ibiza-system-body[data-system-page="castle"] .siege-guild-name img {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    object-fit: contain;
    image-rendering: pixelated;
    border: 1px solid rgba(255, 224, 139, .22);
    border-radius: 8px;
    background: rgba(255, 255, 255, .06);
}

body.ibiza-system-body[data-system-page="castle"] .siege-empty {
    padding: 32px 16px !important;
    color: rgba(247, 239, 255, .72) !important;
    text-align: center;
    font-style: italic;
}

@media (max-width: 991.98px) {
    body.ibiza-system-body[data-system-page="castle"] .siege-loren,
    body.ibiza-system-body[data-system-page="castle"] .siege-next-panel {
        grid-template-columns: 1fr;
    }

    body.ibiza-system-body[data-system-page="castle"] .siege-loren {
        text-align: center;
    }

    body.ibiza-system-body[data-system-page="castle"] .siege-loren__stats,
    body.ibiza-system-body[data-system-page="castle"] .siege-roadmap {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.ibiza-system-body[data-system-page="castle"] .siege-loren__stats b {
        white-space: normal;
    }
}

@media (max-width: 575.98px) {
    body.ibiza-system-body[data-system-page="castle"] .ibiza-system-shell__content {
        padding: 10px;
    }

    body.ibiza-system-body[data-system-page="castle"] .siege-loren,
    body.ibiza-system-body[data-system-page="castle"] .siege-next-panel,
    body.ibiza-system-body[data-system-page="castle"] .siege-guilds-panel {
        border-radius: 14px;
        padding: 14px;
    }

    body.ibiza-system-body[data-system-page="castle"] .siege-loren__mark {
        width: min(210px, 80vw);
        margin-top: 14px;
    }

    body.ibiza-system-body[data-system-page="castle"] .siege-loren h2 {
        font-size: clamp(2rem, 13vw, 3.2rem);
    }

    body.ibiza-system-body[data-system-page="castle"] .siege-loren__stats,
    body.ibiza-system-body[data-system-page="castle"] .siege-roadmap {
        grid-template-columns: 1fr;
    }

    body.ibiza-system-body[data-system-page="castle"] .siege-timer-frame {
        min-height: 150px;
        padding: 18px 10px;
    }

    body.ibiza-system-body[data-system-page="castle"] .siege-timer-frame strong {
        font-size: clamp(1.35rem, 8vw, 2rem);
        letter-spacing: .04em;
    }

    body.ibiza-system-body[data-system-page="castle"] .siege-panel-title {
        align-items: flex-start;
        flex-direction: column;
    }
}
