/* Spiritia experience layer: modern shell without losing the retro fantasy identity. */
:root {
    --signal-cyan: #20bfd0;
    --signal-cyan-deep: #087f8c;
    --signal-green: #69bf3f;
    --signal-red: #d95548;
    --surface-line: rgba(91, 62, 27, 0.34);
    --surface-line-soft: rgba(91, 62, 27, 0.16);
    --surface-shadow: 0 14px 34px rgba(4, 11, 3, 0.28);
    --surface-shadow-soft: 0 7px 20px rgba(4, 11, 3, 0.18);
    --ui-radius: 7px;
}

html.dark-theme {
    --signal-cyan: #43d8e6;
    --signal-cyan-deep: #159aaa;
    --surface-line: rgba(190, 164, 107, 0.26);
    --surface-line-soft: rgba(190, 164, 107, 0.13);
    --surface-shadow: 0 14px 34px rgba(0, 0, 0, 0.48);
    --surface-shadow-soft: 0 7px 20px rgba(0, 0, 0, 0.34);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
}

body {
    text-rendering: optimizeLegibility;
}

.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 5000;
    padding: 10px 14px;
    border: 2px solid var(--gold-bright);
    border-radius: var(--ui-radius);
    background: #13230f;
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    transform: translateY(-160%);
    transition: transform 160ms ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.forest-bg {
    background-image: url('../img/background.jpg');
    background-image: image-set(
        url('../img/background.webp') type('image/webp'),
        url('../img/background.jpg') type('image/jpeg')
    );
    background-size: cover;
    background-attachment: scroll;
}

.forest-bg::before {
    background: rgba(5, 14, 3, 0.24);
}

.page-wrapper {
    max-width: 1320px;
}

.site-header {
    padding: 12px 0 6px;
}

.logo-img {
    max-height: 200px;
    transition: transform 220ms ease, filter 220ms ease;
}

.site-header a:hover .logo-img {
    transform: translateY(-2px) scale(1.015);
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.44));
}

.top-nav {
    position: sticky;
    top: 8px;
    z-index: 950;
    min-height: 48px;
    margin-bottom: 14px;
    border: 2px solid #170c04;
    border-top-color: #8d692e;
    border-radius: var(--ui-radius);
    background: linear-gradient(180deg, rgba(96, 66, 31, 0.98) 0%, rgba(65, 41, 16, 0.98) 22%, rgba(43, 25, 8, 0.99) 62%, rgba(29, 15, 5, 0.99) 100%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 227, 157, 0.24), inset 0 -2px 5px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(12px);
    transition: box-shadow 180ms ease, transform 180ms ease, background-color 180ms ease;
}

.top-nav.is-scrolled {
    background: linear-gradient(180deg, rgba(78, 51, 22, 0.99) 0%, rgba(48, 29, 10, 0.99) 48%, rgba(27, 14, 5, 0.99) 100%);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 227, 157, 0.2), inset 0 -2px 5px rgba(0, 0, 0, 0.4);
}

.top-nav::before {
    display: block;
    inset: 2px;
    border: 1px solid rgba(235, 194, 102, 0.13);
    border-radius: 4px;
}

.top-nav::after {
    display: block;
    height: 46%;
    background: linear-gradient(180deg, rgba(255, 238, 190, 0.08), rgba(255, 255, 255, 0));
}

.nav-item {
    min-height: 46px;
    padding: 11px 15px;
    letter-spacing: 1.1px;
    border-right-color: rgba(198, 161, 80, 0.13);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.74);
}

.nav-item-notif {
    overflow: visible;
}

.notif-bell-badge {
    position: absolute;
    top: 3px;
    right: 4px;
    z-index: 3;
    box-sizing: border-box;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: var(--dofus-red);
    color: #fff !important;
    font-family: 'Open Sans', sans-serif !important;
    font-size: 0.62rem !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    text-shadow: none !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.notif-bell-badge[style*='display: none'] {
    display: none !important;
}

.site-notification-dropdown {
    font-family: 'Open Sans', sans-serif;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    text-shadow: none;
    color: var(--parchment-text);
}

.site-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    text-decoration: none;
    border-bottom: 1px solid rgba(122, 85, 40, 0.15);
    border-left: 3px solid transparent;
    transition: background 0.15s ease;
    letter-spacing: 0;
    text-transform: none;
    text-shadow: none;
}

.site-notif-item.is-unread {
    background: rgba(212, 168, 67, 0.08);
    border-left-color: var(--gold);
}

.site-notif-item.is-hover {
    background: rgba(122, 85, 40, 0.06);
}

.site-notif-icon {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(212, 168, 67, 0.14);
    border: 1px solid rgba(212, 168, 67, 0.28);
    font-size: 1rem;
    line-height: 1;
    text-transform: none;
    letter-spacing: 0;
    text-shadow: none;
}

.site-notif-body {
    flex: 1;
    min-width: 0;
}

.site-notif-title {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--header-brown);
    letter-spacing: 0;
    text-transform: none;
    text-shadow: none;
    line-height: 1.3;
}

.site-notif-message {
    margin-top: 2px;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--parchment-muted);
    letter-spacing: 0;
    text-transform: none;
    text-shadow: none;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.site-notif-time {
    margin-top: 3px;
    font-size: 0.62rem;
    color: #a89870;
    letter-spacing: 0;
    text-transform: none;
    text-shadow: none;
}

.nav-item::after {
    content: '';
    position: absolute;
    right: 12px;
    bottom: 5px;
    left: 12px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, #a07a28 0%, #ecc85e 45%, #f5da78 55%, #d4a843 100%);
    box-shadow: 0 0 8px rgba(236, 200, 94, 0.35);
    opacity: 0;
    transform: scaleX(0.3);
    transition: opacity 160ms ease, transform 160ms ease;
}

.nav-item:hover::after,
.nav-item.active::after,
.nav-item[aria-current='page']::after {
    opacity: 1;
    transform: scaleX(1);
}

.nav-item.active,
.nav-item[aria-current='page'] {
    color: #fff !important;
    background: linear-gradient(180deg, rgba(154, 111, 43, 0.82) 0%, rgba(91, 58, 20, 0.84) 52%, rgba(54, 31, 9, 0.9) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 229, 151, 0.28), inset 0 -2px 4px rgba(0, 0, 0, 0.28);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.nav-item:not(.nav-item-play):hover {
    background: linear-gradient(180deg, rgba(143, 99, 38, 0.48) 0%, rgba(73, 45, 15, 0.58) 100%);
    color: #ffe59a;
}

.nav-item-play {
    margin: 4px;
    min-height: 38px;
    padding-top: 8px;
    padding-bottom: 8px;
    border: 1px solid #7c5d1d;
    border-radius: 5px;
    background: linear-gradient(180deg, #f5dc79 0%, #dfb848 30%, #bd8b28 70%, #946718 100%) !important;
    color: #2c1904 !important;
    text-shadow: 0 1px 0 rgba(255, 239, 172, 0.72) !important;
    box-shadow: inset 0 1px 0 rgba(255, 247, 198, 0.62), inset 0 -2px 4px rgba(94, 54, 6, 0.36), 0 2px 9px rgba(0, 0, 0, 0.34);
}

.nav-item-play:hover,
.nav-item-play.active,
.nav-item-play[aria-current='page'] {
    background: linear-gradient(180deg, #fff0a2 0%, #efcb60 28%, #d6a238 68%, #aa7720 100%) !important;
    color: #211203 !important;
    box-shadow: inset 0 1px 0 rgba(255, 251, 220, 0.75), inset 0 -2px 4px rgba(94, 54, 6, 0.28), 0 0 0 1px rgba(245, 216, 120, 0.2), 0 5px 15px rgba(0, 0, 0, 0.38);
}

.nav-item-play::after {
    background: #fff0aa;
    bottom: 3px;
}

.theme-toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border-color: rgba(225, 187, 96, 0.38);
    background: linear-gradient(180deg, rgba(91, 65, 34, 0.92) 0%, rgba(46, 29, 13, 0.96) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 235, 180, 0.17), 0 2px 7px rgba(0, 0, 0, 0.28);
}

.theme-toggle-btn:hover {
    border-color: rgba(241, 207, 116, 0.64);
    background: linear-gradient(180deg, rgba(121, 86, 39, 0.98) 0%, rgba(60, 37, 14, 0.98) 100%);
}

.nav-item-search input {
    border-color: rgba(222, 184, 96, 0.32) !important;
    background: linear-gradient(180deg, rgba(27, 17, 8, 0.88) 0%, rgba(73, 52, 31, 0.76) 100%) !important;
    color: #fff6dc !important;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.34), 0 1px 0 rgba(255, 235, 178, 0.08) !important;
}

.nav-item-search input:focus {
    border-color: #d7ad4a !important;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3), 0 0 0 2px rgba(215, 173, 74, 0.2) !important;
}

.content-area {
    grid-template-columns: 220px minmax(0, 1fr) 260px;
    gap: 14px;
}

.main-content {
    min-height: 560px;
    padding: 18px;
    border: 1px solid var(--wood-light);
    border-top: 3px solid var(--gold-dark);
    border-radius: var(--ui-radius);
    background: linear-gradient(180deg, var(--parchment-lighter) 0%, var(--parchment-light) 8%, var(--parchment-bg) 72%, var(--parchment-dark) 100%);
    box-shadow: var(--surface-shadow);
}

.main-content::before {
    inset: 3px;
    border-color: rgba(177, 139, 69, 0.22);
    border-radius: 4px;
}

.main-content::after {
    display: none;
}

.sidebar-left,
.sidebar-right {
    gap: 10px;
}

.sidebar-section,
.login-box,
.info-box {
    border: 1px solid var(--wood-light);
    border-radius: var(--ui-radius);
    background: linear-gradient(180deg, var(--parchment-lighter) 0%, var(--parchment-light) 30%, var(--parchment-bg) 72%, var(--parchment-dark) 100%);
    box-shadow: var(--surface-shadow-soft);
}

.sidebar-section-header {
    min-height: 38px;
    padding: 8px 11px;
    border-bottom: 2px solid #28540f;
    background: linear-gradient(180deg, #83d34c 0%, #5eac31 26%, #3b7c1d 66%, #28550f 100%);
    box-shadow: inset 0 1px 0 rgba(231, 255, 205, 0.36), inset 0 -2px 4px rgba(16, 55, 5, 0.28);
}

.sidebar-section-header::after,
.login-box-header::after {
    display: block;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0));
}

.sidebar-btn::after {
    display: block;
}

.sidebar-section-header h3 {
    font-size: 0.66rem;
    letter-spacing: 1.1px;
}

.sidebar-links {
    padding: 3px 0;
    background: transparent;
}

.sidebar-links a {
    min-height: 34px;
    padding: 7px 11px;
    border-left-width: 2px;
    border-bottom-color: var(--surface-line-soft);
}

.sidebar-links a:hover,
.sidebar-links a.active {
    padding-left: 13px;
    background: linear-gradient(90deg, rgba(118, 185, 67, 0.2) 0%, rgba(222, 205, 148, 0.17) 65%, rgba(255, 255, 255, 0.03) 100%);
}

.sidebar-btn,
.login-submit {
    min-height: 40px;
    border-width: 1px;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(49, 32, 9, 0.22), inset 0 1px 0 rgba(255, 244, 185, 0.34);
}

.login-box-header,
.info-box h4 {
    min-height: 38px;
    padding: 9px 11px;
    border-bottom: 1px solid #160d05;
    background: linear-gradient(180deg, #6a4924 0%, #4a2d10 34%, #321b08 72%, #211005 100%);
    box-shadow: inset 0 1px 0 rgba(255, 225, 151, 0.24), inset 0 -2px 4px rgba(0, 0, 0, 0.32);
}

.login-field {
    min-height: 42px;
    border-radius: 5px;
    background: var(--parchment-lighter);
}

.status-dot,
.live-dot {
    position: relative;
    display: inline-block;
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    border-radius: 50%;
    background: #8e948c;
}

[data-server-state='online'] .live-dot,
.live-dot[data-server-state='online'],
#server-dot[data-server-state='online'] {
    background: var(--signal-green) !important;
    box-shadow: 0 0 0 4px rgba(105, 191, 63, 0.14), 0 0 14px rgba(105, 191, 63, 0.64) !important;
}

[data-server-state='offline'] .live-dot,
.live-dot[data-server-state='offline'],
#server-dot[data-server-state='offline'] {
    background: var(--signal-red) !important;
    box-shadow: 0 0 0 4px rgba(217, 85, 72, 0.14) !important;
}

.site-footer {
    margin-top: 16px;
    padding: 22px;
    text-align: left;
    border: 1px solid #150c04;
    border-top: 2px solid rgba(212, 168, 67, 0.72);
    border-radius: var(--ui-radius);
    background: rgba(29, 18, 8, 0.96);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 219, 130, 0.1);
}

.site-footer-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) 1fr 1fr;
    gap: 28px;
}

.site-footer-brand {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.site-footer-mark {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    object-fit: contain;
}

.site-footer-title {
    display: block;
    margin-bottom: 4px;
    color: var(--gold-light);
    font-family: 'Cinzel', serif;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.6px;
}

.site-footer-copy {
    max-width: 420px;
    color: rgba(233, 221, 188, 0.65) !important;
    font-size: 0.73rem !important;
}

.site-footer-column h3 {
    margin-bottom: 8px;
    color: #efe1b5;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    text-shadow: none;
}

.site-footer-links {
    display: grid;
    gap: 6px;
}

.site-footer-links a {
    width: fit-content;
    color: rgba(224, 207, 165, 0.72);
    font-size: 0.73rem;
}

.site-footer-links a:hover {
    color: var(--signal-cyan);
}

.site-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(212, 168, 67, 0.15);
}

.site-footer-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: rgba(239, 225, 181, 0.74);
    font-size: 0.7rem;
    font-weight: 700;
}

/* Homepage hero — one clear composition */
.home-hero {
    position: relative;
    margin: -18px -18px 14px;
    padding: 0;
    overflow: hidden;
    border: 2px solid #76521e;
    border-top-color: #d3aa4a;
    border-radius: 5px 5px 0 0;
    background:
        linear-gradient(105deg, rgba(24, 18, 7, 0.96) 0%, rgba(27, 36, 12, 0.88) 48%, rgba(12, 20, 6, 0.72) 100%),
        linear-gradient(180deg, rgba(255, 221, 134, 0.09) 0%, rgba(0, 0, 0, 0.12) 100%),
        url('../assets/background-classes.jpg') center 54% / cover no-repeat;
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 232, 166, 0.3), inset 0 -12px 28px rgba(0, 0, 0, 0.38), 0 8px 22px rgba(34, 22, 6, 0.28);
    animation: spiritia-hero-in 520ms ease both;
}

.home-hero::before {
    content: '';
    position: absolute;
    inset: 10px;
    z-index: 0;
    border: 1px solid rgba(236, 197, 105, 0.22);
    border-radius: 3px;
    pointer-events: none;
}

.home-hero::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #7a5c1e 0%, #d4a843 35%, #f5da78 50%, #d4a843 65%, #7a5c1e 100%);
    box-shadow: 0 0 12px rgba(212, 168, 67, 0.35);
}

.home-hero-inner {
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    padding: 48px 56px 44px !important;
}

.home-world-pulse {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.home-world-pulse .home-server-console {
    margin: 0;
}

.home-world-pulse .home-quick-paths {
    grid-column: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: 0;
    border: 1px solid rgba(118, 82, 30, 0.55);
    border-radius: var(--ui-radius);
    overflow: hidden;
    background: #1d1106;
}

.home-world-pulse .home-quick-paths a {
    min-height: 48px;
    border-right: 1px solid rgba(228, 185, 84, 0.16);
    border-bottom: 1px solid rgba(228, 185, 84, 0.16);
}

.home-world-pulse .home-quick-paths a:nth-child(2n) {
    border-right: 0;
}

.home-world-pulse .home-quick-paths a:nth-last-child(-n + 2) {
    border-bottom: 0;
}

@keyframes spiritia-hero-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spiritia-pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.35); opacity: 0.65; }
}

@keyframes spiritia-count-pop {
    0% { transform: scale(1); }
    40% { transform: scale(1.18); }
    100% { transform: scale(1); }
}

.live-dot {
    animation: spiritia-pulse-dot 1.8s ease-in-out infinite;
}

.home-live-players {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.6rem;
    margin-left: 4px;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(32, 191, 208, 0.18);
    color: #9ceef5;
    font-variant-numeric: tabular-nums;
}

.home-live-players.is-updated {
    animation: spiritia-count-pop 360ms ease;
}

.home-onboarding-nudge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(212, 168, 67, 0.45);
    border-radius: var(--ui-radius);
    background: linear-gradient(135deg, rgba(106, 158, 58, 0.12), rgba(212, 168, 67, 0.1));
    box-shadow: 0 4px 14px rgba(63, 45, 18, 0.1);
}

.home-onboarding-nudge[hidden] {
    display: none !important;
}

.home-onboarding-nudge-copy strong {
    display: block;
    margin-bottom: 2px;
    color: var(--header-brown);
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
}

.home-onboarding-nudge-copy p {
    margin: 0;
    color: var(--parchment-muted);
    font-size: 0.8rem;
    line-height: 1.45;
}

.home-onboarding-nudge-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}

.spiritia-action-ghost {
    border-color: rgba(122, 85, 40, 0.28);
    background: rgba(255, 255, 255, 0.35);
    color: var(--header-brown);
    box-shadow: none;
}

html.dark-theme .spiritia-action-ghost {
    background: rgba(255, 255, 255, 0.04);
    color: var(--parchment-text);
}

.home-live-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 11px;
    padding: 5px 9px;
    border: 1px solid rgba(125, 192, 76, 0.28);
    border-radius: 4px;
    background: linear-gradient(180deg, rgba(57, 91, 31, 0.52), rgba(21, 39, 12, 0.72));
    color: #d8edc9;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

.home-command-title {
    margin: 0 0 8px;
    color: #fff;
    font-size: 1.74rem;
    letter-spacing: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.76), 0 0 18px rgba(212, 168, 67, 0.18);
}

.home-command-title span {
    color: #f1c95d;
    text-shadow: 0 1px 0 #5d3b09, 0 0 15px rgba(236, 200, 94, 0.22);
}

.home-command-copy {
    max-width: 610px;
    margin: 0;
    color: rgba(248, 239, 210, 0.82);
    font-size: 0.84rem;
    line-height: 1.65;
}

.home-command-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 16px;
}

.spiritia-action {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid transparent;
    border-radius: 5px;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.spiritia-action:hover {
    transform: translateY(-1px);
}

.spiritia-action svg {
    width: 17px;
    height: 17px;
}

.spiritia-action-primary {
    border-color: #8d6820;
    background: linear-gradient(180deg, #f3d46e 0%, #d9aa3a 34%, #b78120 72%, #8f6113 100%);
    color: #2b1b06;
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 243, 184, 0.44);
}

.spiritia-action-primary:hover {
    background: linear-gradient(180deg, #ffed9c 0%, #ebc65c 34%, #c9952c 72%, #9f6e18 100%);
    color: #211405;
}

.spiritia-action-secondary {
    border-color: rgba(135, 190, 91, 0.46);
    background: linear-gradient(180deg, rgba(74, 119, 42, 0.88) 0%, rgba(43, 81, 24, 0.92) 55%, rgba(28, 57, 15, 0.94) 100%);
    color: #f5f0df;
    box-shadow: inset 0 1px 0 rgba(220, 255, 194, 0.18), 0 4px 12px rgba(0, 0, 0, 0.22);
}

.spiritia-action-secondary:hover {
    border-color: #8fc962;
    background: linear-gradient(180deg, rgba(91, 143, 52, 0.94) 0%, rgba(52, 96, 29, 0.96) 58%, rgba(34, 67, 18, 0.98) 100%);
    color: #fff;
}

.home-server-console {
    align-self: center;
    padding: 13px 14px 12px;
    border: 1px solid rgba(220, 180, 83, 0.48);
    border-radius: 6px;
    background: linear-gradient(145deg, rgba(26, 19, 8, 0.9) 0%, rgba(24, 44, 14, 0.88) 58%, rgba(10, 27, 8, 0.91) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 233, 169, 0.2), inset 0 0 24px rgba(24, 65, 12, 0.28), 0 8px 22px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(4px);
}

.home-console-heading {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(236, 199, 106, 0.22);
}

.home-console-heading > div {
    display: grid;
    gap: 1px;
}

.home-console-heading span:not(.home-console-rune) {
    color: rgba(231, 221, 189, 0.56);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.55px;
    text-transform: uppercase;
}

.home-console-heading strong {
    color: #efd27b;
    font-family: 'Cinzel', serif;
    font-size: 0.76rem;
    letter-spacing: 0.4px;
}

.home-console-rune {
    position: relative;
    width: 29px;
    height: 29px;
    flex: 0 0 29px;
    border: 1px solid rgba(44, 202, 214, 0.5);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(58, 211, 220, 0.3) 0%, rgba(13, 87, 93, 0.36) 46%, rgba(9, 36, 34, 0.74) 72%);
    box-shadow: inset 0 0 8px rgba(83, 225, 233, 0.28), 0 0 12px rgba(32, 191, 208, 0.2);
}

.home-console-rune::before {
    content: '';
    position: absolute;
    width: 7px;
    height: 7px;
    margin: 10px;
    border-radius: 50%;
    background: #63e0e8;
    box-shadow: 0 0 8px rgba(99, 224, 232, 0.82);
}

.home-signal-list {
    display: grid;
    align-content: center;
    margin: 0;
    padding-right: 0;
    border-top: 0;
}

.home-signal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 34px;
    border-bottom: 1px solid rgba(236, 199, 106, 0.13);
}

.home-signal-item dt {
    color: rgba(240, 236, 214, 0.57);
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.home-signal-item dd {
    max-width: 160px;
    color: #fff;
    font-size: 0.76rem;
    font-weight: 800;
    text-align: right;
}

.home-signal-item dd.signal-cyan {
    color: var(--signal-cyan);
}

.home-quick-paths a {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 10px;
    background: linear-gradient(180deg, rgba(78, 52, 22, 0.96) 0%, rgba(47, 29, 10, 0.98) 55%, rgba(29, 16, 5, 0.99) 100%);
    color: rgba(242, 224, 174, 0.82);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    font-size: 0.7rem;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.home-quick-paths a:hover {
    background: linear-gradient(180deg, rgba(105, 73, 29, 0.98) 0%, rgba(64, 39, 13, 0.99) 58%, rgba(37, 20, 6, 1) 100%);
    color: #f4cf68;
    transform: translateY(-1px);
}

.home-quick-paths svg {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
}

.news-filter-bar {
    display: flex;
    align-items: stretch;
    gap: 5px;
    margin-bottom: 12px;
    flex-wrap: nowrap;
    overflow-x: auto;
    border-bottom: 1px solid var(--wood-light);
    padding-bottom: 0;
    scrollbar-width: none;
}

.news-filter-bar::-webkit-scrollbar {
    display: none;
}

.news-filter-btn {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 6px 14px;
    border-radius: 5px 5px 0 0;
    font-family: 'Cinzel', serif;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border: 1px solid var(--wood-light);
    border-bottom: none;
    background: linear-gradient(180deg, var(--parchment-dark), var(--parchment-bg));
    color: var(--parchment-muted);
    transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.news-filter-btn.is-active {
    position: relative;
    top: 2px;
    background: linear-gradient(180deg, var(--parchment-lighter), var(--parchment-lighter));
    color: var(--header-brown);
}

.news-slideshow {
    position: relative;
    border: 1px solid var(--wood-light);
    border-radius: var(--ui-radius);
    overflow: hidden;
    margin-bottom: 14px;
    box-shadow: var(--surface-shadow-soft);
    content-visibility: auto;
    contain-intrinsic-size: auto 280px;
}

.news-slide {
    display: none;
    text-decoration: none;
    position: relative;
    min-height: 260px;
    isolation: isolate;
}

.news-slide.is-visible,
.news-slide:not([hidden]).is-visible {
    display: block;
}

.news-slide-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-slide-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(30, 20, 5, 0.92) 0%, rgba(30, 20, 5, 0.6) 40%, rgba(30, 20, 5, 0.15) 100%);
}

.news-slide-fallback {
    position: absolute;
    inset: 0;
    background: var(--parchment-light);
}

.news-slide-body {
    position: relative;
    z-index: 1;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 260px;
}

.news-slide-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.news-slide-body h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--header-brown);
    margin-bottom: 6px;
    line-height: 1.3;
}

.news-slide-body p {
    font-size: 0.82rem;
    color: #5a4a2a;
    line-height: 1.5;
    margin: 0;
}

.news-slide-body.has-media h2 {
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.news-slide-body.has-media p,
.news-slide-body.has-media .news-slide-date {
    color: rgba(255, 255, 255, 0.85);
}

.news-slide-more {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.78rem;
    color: var(--forest-mid);
    font-weight: 700;
}

.news-slide-body.has-media .news-slide-more {
    color: var(--gold);
}

.news-cat-badge {
    display: inline-block;
    padding: 3px 12px;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(180deg, #6a9e3a, #4a7c28);
}

.news-cat-badge.tone-evento {
    background: linear-gradient(180deg, #e8943a, #c06a20);
}

.news-cat-badge.tone-atualizacao {
    background: linear-gradient(180deg, #2c6fbb, #1a4f8a);
}

.news-cat-badge.compact {
    padding: 2px 8px;
    font-size: 0.58rem;
    border-radius: 2px;
    flex-shrink: 0;
    white-space: nowrap;
    text-align: center;
}

.news-slide-controls {
    position: absolute;
    bottom: 10px;
    right: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 2;
}

.news-slide-controls button {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 1px solid var(--wood-light);
    background: linear-gradient(180deg, var(--parchment-lighter), var(--parchment-bg));
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--header-brown);
    font-size: 0.8rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.news-slide-controls span {
    font-size: 0.7rem;
    color: var(--parchment-muted);
    min-width: 30px;
    text-align: center;
}

.news-list-panel {
    background: linear-gradient(180deg, var(--parchment-lighter), var(--parchment-bg), var(--parchment-dark));
    border: 2px solid var(--wood-light);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.news-list-header {
    background: linear-gradient(180deg, #6a4a28, #523518, #3e2810, #2e1c0a);
    padding: 8px 12px;
    border-bottom: 2px solid var(--wood-darkest);
    box-shadow: inset 0 1px 0 rgba(180, 140, 70, 0.2);
}

.news-list-header span {
    font-family: 'Cinzel', serif;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--gold-light);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.news-list-body {
    padding: 4px 0;
}

.news-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    text-decoration: none;
    border-bottom: 1px solid rgba(122, 85, 40, 0.15);
    transition: background 0.15s;
}

.news-list-item:hover {
    background: rgba(122, 85, 40, 0.06);
}

.news-list-item[hidden] {
    display: none !important;
}

.news-list-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--header-brown);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.news-list-date {
    font-size: 0.7rem;
    color: var(--parchment-muted);
    flex-shrink: 0;
}

.news-list-footer {
    text-align: center;
    padding: 6px;
}

.news-list-footer a {
    font-size: 0.72rem;
    color: var(--green-dark);
    font-weight: 700;
    text-decoration: none;
}

.home-empty-welcome {
    text-align: center;
    padding: 40px 0;
}

.home-empty-welcome p {
    color: var(--parchment-muted);
    font-size: 0.9rem;
    line-height: 1.7;
    max-width: 450px;
    margin: 0 auto;
}

.home-activity {
    margin: 4px 0 16px;
}

.home-section-link {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--green-dark);
    text-decoration: none;
}

.home-activity-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.home-activity-counter {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--parchment-muted);
    font-variant-numeric: tabular-nums;
}

.home-activity-carousel {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    gap: 8px;
    align-items: center;
}

.home-activity-viewport {
    position: relative;
    min-height: 58px;
}

.home-activity-nav {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--wood-light);
    border-radius: 6px;
    background: linear-gradient(180deg, var(--parchment-lighter), var(--parchment-bg));
    color: var(--header-brown);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
    transition: background-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.home-activity-nav:hover {
    color: var(--gold-deepest);
    transform: translateY(-1px);
}

.home-activity-item {
    display: none;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 58px;
    padding: 12px 14px;
    border: 1px solid var(--surface-line-soft);
    border-radius: 6px;
    background: var(--parchment-lighter);
    text-decoration: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, opacity 220ms ease;
}

.home-activity-item.is-active {
    display: grid;
    animation: spiritia-activity-in 280ms ease;
}

.home-activity-item:hover {
    border-color: rgba(212, 168, 67, 0.55);
    box-shadow: 0 6px 16px rgba(63, 45, 18, 0.1);
}

@keyframes spiritia-activity-in {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.home-activity-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(74, 140, 42, 0.14);
    color: var(--green-dark);
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.home-activity-item.tone-forum .home-activity-badge { background: rgba(44, 111, 187, 0.14); color: var(--dofus-blue); }
.home-activity-item.tone-build .home-activity-badge { background: rgba(212, 168, 67, 0.18); color: var(--gold-deepest); }
.home-activity-item.tone-gallery .home-activity-badge { background: rgba(224, 138, 48, 0.16); color: var(--dofus-orange); }
.home-activity-item.tone-lfg .home-activity-badge { background: rgba(139, 92, 246, 0.14); color: #6d28d9; }
.home-activity-item.tone-comment .home-activity-badge,
.home-activity-item.tone-wall .home-activity-badge { background: rgba(90, 74, 42, 0.12); color: var(--header-brown); }

.home-activity-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.home-activity-copy strong {
    color: var(--header-brown);
    font-size: 0.82rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-activity-copy span {
    color: var(--parchment-muted);
    font-size: 0.7rem;
}

.home-events-title {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.home-events-title svg {
    width: 18px;
    height: 18px;
    color: var(--dofus-orange);
}

.home-event-card {
    background: linear-gradient(135deg, rgba(106, 158, 58, 0.08), rgba(212, 168, 67, 0.06));
    border: 1px solid rgba(122, 85, 40, 0.4);
    border-radius: 5px;
    padding: 12px;
    margin-bottom: 8px;
}

.home-event-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    gap: 8px;
}

.home-event-topline strong {
    font-family: 'Cinzel', serif;
    font-size: 0.88rem;
    color: var(--header-brown);
}

.home-event-status {
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 700;
    text-transform: uppercase;
}

.home-event-status.is-live {
    background: var(--forest-light);
    color: #fff;
}

.home-event-status.is-soon {
    background: var(--gold);
    color: var(--wood-dark);
}

.home-event-card p {
    font-size: 0.82rem;
    color: var(--parchment-text);
    margin-bottom: 4px;
}

.home-event-when {
    font-size: 0.7rem;
    color: var(--parchment-muted);
}

/* Ranking quick preview */
.ranking-panel {
    background: linear-gradient(180deg, var(--parchment-lighter) 0%, var(--parchment-light) 100%);
    border: 2px solid var(--wood-light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.ranking-character-row {
    position: relative;
}

.ranking-character-row:hover,
.ranking-character-row:focus-visible {
    background: rgba(184, 160, 106, 0.08);
}

.ranking-preview-card {
    position: fixed;
    z-index: 1200;
    width: min(280px, calc(100vw - 24px));
    padding: 12px;
    border: 1px solid var(--wood-light);
    border-radius: 8px;
    background: linear-gradient(180deg, var(--parchment-lighter), var(--parchment-bg));
    box-shadow: 0 14px 34px rgba(4, 11, 3, 0.28);
    pointer-events: none;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 160ms ease, transform 160ms ease;
}

.ranking-preview-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.ranking-preview-card[hidden] {
    display: none !important;
}

.ranking-preview-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.ranking-preview-top img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(184, 160, 106, 0.12);
}

.ranking-preview-top strong {
    display: block;
    color: var(--header-brown);
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
}

.ranking-preview-top span {
    color: var(--parchment-muted);
    font-size: 0.74rem;
}

.ranking-preview-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.ranking-preview-stats div {
    padding: 7px 8px;
    border-radius: 5px;
    background: rgba(122, 85, 40, 0.07);
}

.ranking-preview-stats dt {
    color: var(--parchment-muted);
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.ranking-preview-stats dd {
    margin: 2px 0 0;
    color: var(--header-brown);
    font-size: 0.82rem;
    font-weight: 800;
}

html.dark-theme .ranking-panel,
html.dark-theme .ranking-preview-card,
html.dark-theme .home-activity-item,
html.dark-theme .news-list-panel,
html.dark-theme .home-feature-card {
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

html.dark-theme .news-slide-body p {
    color: var(--parchment-muted);
}

html.dark-theme .home-onboarding-nudge {
    background: linear-gradient(135deg, rgba(74, 140, 42, 0.14), rgba(212, 168, 67, 0.08));
}

@media (max-width: 900px) {
    .home-world-pulse {
        grid-template-columns: 1fr;
    }

    .home-onboarding-nudge {
        flex-direction: column;
        align-items: stretch;
    }
}

.home-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.home-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.home-feature-card {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 11px;
    align-items: start;
    padding: 13px;
    border: 1px solid var(--surface-line-soft);
    border-radius: 6px;
    background: var(--parchment-lighter);
    box-shadow: 0 3px 10px rgba(63, 45, 18, 0.08);
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.home-feature-card:hover {
    transform: translateY(-2px);
    border-color: rgba(8, 127, 140, 0.48);
    box-shadow: 0 8px 20px rgba(63, 45, 18, 0.13);
}

.home-feature-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(8, 127, 140, 0.24);
    border-radius: 6px;
    background: rgba(32, 191, 208, 0.08);
    color: var(--signal-cyan-deep);
}

.home-feature-icon svg {
    width: 20px;
    height: 20px;
}

.home-feature-card strong {
    display: block;
    margin-bottom: 3px;
    color: var(--header-brown);
    font-family: 'Cinzel', serif;
    font-size: 0.78rem;
}

.home-feature-card p {
    margin: 0;
    color: var(--parchment-muted);
    font-size: 0.74rem;
    line-height: 1.55;
}

.home-deferred {
    content-visibility: auto;
    contain-intrinsic-size: auto 420px;
}

/* Mobile command drawer */
.mobile-command-dialog {
    width: min(100%, 600px);
    max-width: 600px;
    max-height: min(86dvh, 760px);
    margin: auto auto 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 8px 8px 0 0;
    background: transparent;
    color: #f5f0df;
    box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.55);
}

.mobile-command-dialog::backdrop {
    background: rgba(3, 8, 2, 0.72);
    backdrop-filter: blur(3px);
}

.mobile-command-sheet {
    max-height: min(86dvh, 760px);
    overflow-y: auto;
    overscroll-behavior: contain;
    border-top: 2px solid var(--gold);
    background: linear-gradient(180deg, #243b18 0%, #15250f 18%, #0e190b 100%);
}

.mobile-command-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(180deg, rgba(73, 52, 25, 0.98) 0%, rgba(41, 27, 11, 0.99) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 228, 158, 0.14), 0 5px 14px rgba(0, 0, 0, 0.25);
}

.mobile-command-title {
    display: block;
    color: #fff;
    font-family: 'Cinzel', serif;
    font-size: 0.87rem;
    font-weight: 800;
}

.mobile-command-status {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 3px;
    color: rgba(239, 235, 216, 0.62);
    font-size: 0.67rem;
}

.mobile-command-close {
    width: 44px;
    height: 44px;
    display: grid;
    flex: 0 0 44px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    cursor: pointer;
}

.mobile-command-close svg {
    width: 20px;
    height: 20px;
}

.mobile-command-body {
    display: grid;
    gap: 18px;
    padding: 15px 15px calc(20px + env(safe-area-inset-bottom));
}

.mobile-command-section h3 {
    margin-bottom: 8px;
    color: #a9b69f;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    text-shadow: none;
}

.mobile-command-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.mobile-command-link {
    min-height: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    background: linear-gradient(180deg, rgba(49, 79, 32, 0.92) 0%, rgba(25, 45, 18, 0.96) 100%);
    color: #e9e6d8;
    font-size: 0.68rem;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}

.mobile-command-link:hover,
.mobile-command-link.active {
    border-color: rgba(229, 193, 101, 0.62);
    background: linear-gradient(180deg, rgba(137, 99, 40, 0.9) 0%, rgba(65, 45, 17, 0.96) 100%);
    color: #ffe28b;
}

.mobile-command-link svg {
    width: 21px;
    height: 21px;
}

.mobile-command-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.mobile-command-actions .spiritia-action {
    min-height: 46px;
}

.mobile-command-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mobile-command-socials a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 5px;
    color: rgba(239, 235, 216, 0.74);
    font-size: 0.68rem;
    font-weight: 700;
    text-decoration: none;
}

.mobile-command-socials a:hover {
    border-color: var(--signal-cyan);
    color: #fff;
}

@media (max-width: 1080px) {
    .content-area {
        grid-template-columns: 205px minmax(0, 1fr) 235px;
        gap: 10px;
    }

    .nav-item {
        padding-right: 11px;
        padding-left: 11px;
        letter-spacing: 0.7px;
    }
}

@media (max-width: 900px) {
    .site-header {
        padding-top: 8px;
    }

    .logo-img {
        max-height: 160px;
    }

    .site-footer-grid {
        grid-template-columns: 1.4fr 1fr;
    }

    .site-footer-column:last-child {
        grid-column: 2;
    }
}

@media (max-width: 600px) {
    html {
        scroll-padding-top: 64px;
    }

    body {
        padding-bottom: calc(70px + env(safe-area-inset-bottom));
    }

    .forest-bg {
        background-position: 47% top;
        background-size: cover;
    }

    .forest-bg::before {
        background: rgba(4, 12, 3, 0.32);
    }

    .content-title {
        font-size: 1.05rem;
    }

    .site-header {
        padding: 3px 0 2px;
    }

    .logo-img {
        max-width: min(58vw, 180px);
        max-height: 100px;
    }

    .top-nav {
        top: 5px;
        min-height: 46px;
        margin-bottom: 7px;
        border-top-color: rgba(225, 185, 87, 0.54);
        border-radius: 6px;
    }

    .nav-item-search {
        min-height: 46px;
    }

    .nav-item-search input {
        min-height: 36px !important;
        border-radius: 5px !important;
    }

    .content-area {
        display: block;
        padding: 0 6px;
        min-height: 0;
    }

    .sidebar-left,
    .sidebar-right {
        display: none !important;
    }

    .main-content {
        min-height: 0;
        padding: 11px;
        border-top-width: 2px;
        box-shadow: 0 10px 24px rgba(4, 11, 3, 0.28);
    }

    .home-hero {
        margin: -11px -11px 12px;
        padding: 0;
        background-position: 58% 54%;
    }

    .home-hero::before {
        inset: 8px;
    }

    .home-hero-inner {
        padding: 32px 28px 30px !important;
    }

    .home-command-title {
        font-size: 1.35rem;
    }

    .home-command-copy {
        font-size: 0.79rem;
    }

    .home-command-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .spiritia-action {
        min-height: 46px;
        padding-right: 10px;
        padding-left: 10px;
        text-align: center;
    }

    .home-world-pulse .home-quick-paths a {
        min-height: 46px;
    }

    .news-filter-bar .news-filter-btn {
        min-height: 42px;
        flex: 1 1 auto;
        font-size: 0.62rem;
        letter-spacing: 0.4px;
        padding: 6px 8px;
    }

    .news-slide,
    .news-slide-body {
        min-height: 230px;
    }

    .news-slide-body {
        padding: 16px 15px 50px;
    }

    .news-slide-body h2 {
        font-size: 1.08rem;
    }

    .news-slide-controls button {
        width: 42px;
        height: 42px;
    }

    .news-list-item {
        min-height: 48px;
        padding: 9px 8px;
    }

    .home-activity-carousel {
        grid-template-columns: 34px minmax(0, 1fr) 34px;
        gap: 6px;
    }

    .home-activity-item,
    .home-activity-item.is-active {
        grid-template-columns: 68px minmax(0, 1fr);
    }

    .home-activity-nav {
        width: 34px;
        height: 42px;
    }

    .ranking-preview-card {
        display: none !important;
    }

    .home-feature-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .home-feature-card {
        min-height: 82px;
    }

    .site-footer {
        margin: 10px 6px calc(12px + env(safe-area-inset-bottom));
        padding: 18px 15px;
    }

    .site-footer-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 20px 14px;
    }

    .site-footer-brand {
        grid-column: 1 / -1;
    }

    .site-footer-column:last-child {
        grid-column: auto;
    }

    .site-footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .mobile-quick-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
        width: 100vw;
        max-width: 100vw;
        overflow: hidden;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        padding-bottom: env(safe-area-inset-bottom);
        border-top: 1px solid rgba(212, 168, 67, 0.76);
        background: linear-gradient(180deg, #52381b 0%, #2f1d0b 38%, #151108 100%);
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 233, 171, 0.08);
    }

    .mobile-quick-nav a,
    .mobile-quick-nav button {
        min-width: 0;
        min-height: 62px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 5px 2px;
        border: 0;
        border-right: 1px solid rgba(212, 168, 67, 0.12);
        background: transparent;
        color: #c9c3aa;
        font-family: 'Open Sans', sans-serif;
        font-size: 0.59rem;
        font-weight: 800;
        text-align: center;
        text-decoration: none;
        cursor: pointer;
    }

    .mobile-quick-nav a:last-child,
    .mobile-quick-nav button:last-child {
        border-right: 0;
    }

    .mobile-quick-nav a.active,
    .mobile-quick-nav button[aria-expanded='true'] {
        background: linear-gradient(180deg, rgba(154, 111, 43, 0.58) 0%, rgba(64, 42, 15, 0.74) 100%);
        color: #ffe18a;
        box-shadow: inset 0 2px 0 rgba(239, 202, 104, 0.68);
    }

    .mobile-quick-nav svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 380px) {
    .home-command-actions,
    .mobile-command-actions {
        grid-template-columns: minmax(0, 1fr);
    }

    .mobile-command-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mobile-quick-nav a,
    .mobile-quick-nav button {
        font-size: 0.55rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (forced-colors: active) {
    .nav-item::after,
    .home-hero::after {
        background: Highlight;
    }
}
