/* ==========================================================================
   1. DESIGN TOKENS & SYSTEM ROOT
   ========================================================================== */
:root {
    --bg-parchment: #f4edd2;
    --bg-parchment-dark: #e6dcbc;
    --ink-dark: #2b2216;
    --ink-sepia: #5c4a37;
    --accent-crimson: #8c2626;
    --accent-emerald: #1e4620;
    --border-style: 2px solid #3d3020;
}

.staging-badge{position:fixed;top:0;left:50%;transform:translateX(-50%);z-index:9999;background:#8b1d1d;color:#fff;padding:4px 12px;font-weight:700}.entry-drawer{position:fixed;right:0;top:0;height:100vh;width:min(440px,92vw);z-index:9000;background:#f4e6c7;color:#251c12;box-shadow:-8px 0 30px #0008;padding:24px;overflow:auto}.entry-drawer[hidden]{display:none}
@media print{header,nav,.mobile-filter-toggle,.tool-feedback-form,.server-status-banner{display:none!important}body{background:#fff!important;color:#000!important}.tool-card,.selected-item-card{box-shadow:none!important;border:1px solid #777!important;break-inside:avoid}a{color:#000;text-decoration:none}a[href]::after{content:" (" attr(href) ")";font-size:.75em}}

/* ==========================================================================
   2. TIMING FRAME & MAGICAL ANIMATIONS
   ========================================================================== */
@keyframes inkBleedFade {
    0% {
        opacity: 0;
        filter: blur(10px);
        transform: scale(0.98);
    }
    100% {
        opacity: 1;
        filter: blur(0px);
        transform: scale(1);
    }
}

@keyframes parchmentFloat {
    0% { top: 0px; }
    50% { top: -4px; }
    100% { top: 0px; }
}

@keyframes blockReveal {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   3. STRUCTURAL BASE & FULL WIDTH WRAPPERS
   ========================================================================== */
body {
    margin: 0;
    padding: 0;
    background-color: #1a130b;
    color: var(--ink-dark);
    font-family: 'Georgia', serif;
}

.content-wrapper {
    padding: 40px 20px;
    display: flex;
    justify-content: center;
}

main {
    background-color: var(--bg-parchment);
    padding: 60px;
    max-width: 1200px;
    width: 100%;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.15);
    border: var(--border-style);
    box-sizing: border-box;
    animation: inkBleedFade 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* ==========================================================================
   4. HORIZONTAL LEATHER-BOUND HEADER BANNER
   ========================================================================== */
header {
    background: #3d3020;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 100;
    border-bottom: 1px solid #dfce9f;
}

.nav-container {
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 16px;
    box-sizing: border-box;
}

.mobile-menu-toggle {
    display: none;
}

.primary-navigation {
    width: 100%;
    max-width: 1200px;
    min-width: 0;
}

header h1 {
    font-size: 1.4rem;
    letter-spacing: 2px;
    color: #dfce9f;
    margin: 0;
}

header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(4px, 0.7vw, 10px);
}

header nav ul li a {
    color: #f4edd2;
    text-decoration: none;
    font-size: 1rem;
    padding: 10px clamp(9px, 1vw, 14px);
    white-space: nowrap;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

header nav ul li a:hover, 
header nav ul li a.active {
    background: #574530;
    color: #fff;
    border-bottom: 3px solid var(--accent-crimson);
}

/* ========================================================================== 
   4A. LIVE SERVER STATUS BANNER
   ========================================================================== */
.server-status-banner {
    width: 100%;
    background: #251c12;
    border-top: 1px solid #6f5a3d;
    color: var(--bg-parchment);
}

.server-status-banner[hidden] {
    display: none;
}

.server-status-container {
    box-sizing: border-box;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 9px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.server-status-list {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    justify-content: safe center;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: #6f5a3d transparent;
}

.server-status-list::-webkit-scrollbar {
    height: 5px;
}

.server-status-list::-webkit-scrollbar-thumb {
    background: #6f5a3d;
    border-radius: 4px;
}

.server-status-item {
    flex: 0 0 auto;
    width: max-content;
    min-width: max-content;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: #3d3020;
    border: 1px solid #6f5a3d;
    font-size: 0.82rem;
    text-align: center;
    white-space: nowrap;
}

.server-status-item.is-boosted-server {
    background: linear-gradient(120deg, #3d3020, #75520c, #3d3020);
    background-size: 220% 220%;
    border-color: #d6aa3a;
    box-shadow: 0 0 9px rgba(255, 196, 55, 0.45);
    animation: boosted-server-background 2.4s ease-in-out infinite;
}


.server-status-item.is-test-boost-server {
    background: linear-gradient(120deg, #302a4f, #315d86, #302a4f);
    background-size: 220% 220%;
    border-color: #7ab8ef;
    box-shadow: 0 0 9px rgba(122, 184, 239, 0.5);
    animation: test-boost-server-background 1.8s ease-in-out infinite;
}

@keyframes test-boost-server-background {
    0%, 100% {
        background-position: 0% 50%;
        box-shadow: 0 0 6px rgba(122, 184, 239, 0.35);
    }
    50% {
        background-position: 100% 50%;
        box-shadow: 0 0 15px rgba(176, 133, 255, 0.8);
    }
}

@keyframes boosted-server-background {
    0%, 100% {
        background-position: 0% 50%;
        box-shadow: 0 0 6px rgba(255, 196, 55, 0.3);
    }
    50% {
        background-position: 100% 50%;
        box-shadow: 0 0 14px rgba(255, 215, 90, 0.75);
    }
}

@media (prefers-reduced-motion: reduce) {
    .server-status-item.is-boosted-server {
        animation: none;
        background: #63470e;
    }

    .server-status-item.is-test-boost-server {
        animation: none;
        background: #394f70;
    }
}

.server-name-row {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.server-name {
    color: #fff8df;
}

.subscription-lock {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    line-height: 1;
    filter: drop-shadow(0 0 2px rgba(255, 228, 154, 0.45));
}

.boost-status {
    padding: 2px 2px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
}

.boost-status.is-boosted {
    background: #6b4d08;
    color: #ffe49a;
}

.boost-status.is-test-boost {
    background: #365f8a;
    color: #e8f4ff;
    border: 1px solid #8bc6ff;
    padding-inline: 7px;
    letter-spacing: 0.08em;
}

.boost-status.not-boosted {
    background: #4b443a;
    color: #d7cdb9;
}

.online-users {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #dcebd8;
}

.server-user-count {
    color: #ff6b6b;
}

.server-latency {
    color: inherit;
}

.server-latency-unit {
    color: #66b7ff;
}

.online-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #65c466;
    box-shadow: 0 0 5px rgba(101, 196, 102, 0.75);
}

.server-status-message {
    color: #c8b995;
    font-size: 0.8rem;
    font-style: italic;
}

.server-status-close {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-crimson);
    border: 2px solid #f4edd2;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1;
    box-shadow: 0 0 6px rgba(0,0,0,0.45);
}

.server-status-close:hover,
.server-status-close:focus-visible {
    background: #b53636;
    outline: 2px solid #ffe49a;
    outline-offset: 2px;
}

/* ==========================================================================
   5. JOURNAL HERO SPLIT SEGMENT
   ========================================================================== */
.hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    border-bottom: var(--border-style);
    padding-bottom: 50px;
    margin-bottom: 50px;
    animation: blockReveal 0.8s cubic-bezier(0.25, 1, 0.5, 1) 0.2s both;
}

.hero-text h2 {
    font-size: 2.6rem;
    color: var(--accent-crimson);
    margin-top: 0;
    line-height: 1.2;
}

.drop-cap {
    float: left;
    font-size: 4.2rem;
    line-height: 0.8;
    padding-top: 4px;
    padding-right: 8px;
    font-weight: bold;
    color: var(--accent-crimson);
}

.hero-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--ink-dark);
}

.cta-btn {
    display: inline-block;
    background-color: var(--accent-crimson);
    color: #fff;
    padding: 15px 35px;
    text-decoration: none;
    font-weight: bold;
    letter-spacing: 1px;
    border: var(--border-style);
    box-shadow: 4px 4px 0px var(--ink-dark);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 15px;
}

.hero-text .cta-btn {
    display: block;
    width: max-content;
    margin: 15px auto 0;
}

.cta-btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px var(--ink-dark);
    background-color: #a12f2f;
}

.hero-map {
    width: 100%;
    max-width: 260px;
    justify-self: center;
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-map a {
    display: block;
    width: 100%;
}

.hero-map img {
    display: block;
    width: 100%;
    height: auto;
}

/* ==========================================================================
   6. INNER SUB-PAGES TAB FILTER MENU
   ========================================================================== */
.section-header {
    text-align: center;
    border-bottom: var(--border-style);
    padding-bottom: 25px;
    margin-bottom: 40px;
}

.top-filter-menu {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.top-filter-menu li {
    position: relative;
}

.top-filter-menu li a {
    display: inline-block;
    color: var(--ink-sepia);
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    padding: 8px 20px;
    border: 1px solid transparent;
    border-radius: 3px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.top-filter-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background-color: var(--accent-crimson);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.top-filter-menu li a:hover::after {
    width: 70%;
}

.top-filter-menu li a:hover {
    color: var(--accent-crimson);
}

.top-filter-menu li a.active-filter {
    background-color: var(--bg-parchment-dark);
    border: 1px solid var(--ink-dark);
    color: var(--accent-crimson);
    box-shadow: inset 0 0 5px rgba(0,0,0,0.08);
}

.top-filter-menu li a.active-filter::after {
    display: none;
}

/* ==========================================================================
   7. CHRONICLE GRID VIEWPORTS & CARD HOVERS
   ========================================================================== */
.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 45px;
    color: var(--ink-sepia);
    border-bottom: 1px dashed var(--ink-sepia);
    padding-bottom: 15px;
    animation: blockReveal 0.8s cubic-bezier(0.25, 1, 0.5, 1) 0.4s both;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 35px;
}

/* Scrollable hero roster. Kept separate from the shared grid so other pages
   retain their existing layout. */
.roster-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    align-items: start;
    max-height: 75vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 5px 18px 5px 5px;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: var(--ink-sepia) var(--bg-parchment-dark);
}

.roster-grid::-webkit-scrollbar {
    width: 12px;
}

.roster-grid::-webkit-scrollbar-track {
    background: var(--bg-parchment-dark);
    border: 1px solid var(--ink-sepia);
}

.roster-grid::-webkit-scrollbar-thumb {
    background: var(--ink-sepia);
    border: 2px solid var(--bg-parchment-dark);
    border-radius: 6px;
}

.roster-grid::-webkit-scrollbar-thumb:hover {
    background: var(--ink-dark);
}

.roster-grid:focus-visible {
    outline: 2px solid var(--accent-crimson);
    outline-offset: 4px;
}

.roster-empty {
    grid-column: 1 / -1;
    margin: 0;
    text-align: center;
    font-style: italic;
}

/* Static hero cards: all information remains visible without a flip action. */
.roster-card {
    box-sizing: border-box;
    min-width: 0;
    padding: 22px;
    background-color: #dfce9f;
    border: var(--border-style);
    box-shadow: 2px 4px 10px rgba(0,0,0,0.12);
}

.roster-card-heading {
    text-align: center;
}

.roster-card-heading .badge {
    display: inline-block;
    margin: 0 0 12px;
    border-radius: 20px;
}

.roster-card-class {
    margin: 0;
    color: var(--ink-dark);
    font-size: 1.8rem;
    letter-spacing: 1px;
}

.roster-card-heading h3 {
    margin: 0;
    color: var(--ink-dark);
    font-size: 1.8rem;
    letter-spacing: 1px;
    font-family: "Old English Text MT", "Cloister Black", "Blackletter", serif;
}

.roster-card-heading p {
    margin: 5px 0 15px;
    color: var(--ink-sepia);
    font-size: 0.95rem;
    font-style: italic;
}

.roster-card-sigil {
    margin-bottom: 18px;
    padding: 18px 10px;
    background: rgba(0,0,0,0.02);
    border: 1px dashed var(--ink-sepia);
    color: var(--ink-sepia);
    text-align: center;
    font-style: italic;
}

.roster-card-details h4 {
    margin: 0 0 12px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--ink-sepia);
    color: var(--ink-dark);
    font-size: 1.25rem;
    text-align: center;
}

.roster-card-emblems {
    margin-top: 20px;
    color: var(--accent-crimson);
    font-size: 1.5rem;
    text-align: center;
}

/* Skill guide: full-width records with compact progression tables. */
.skills-hero-summary {
    align-self: center;
    width: 100%;
    max-width: 360px;
    justify-self: center;
}

.skills-jump-menu {
    border-bottom: 0;
    padding-bottom: 0;
}

.skills-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
}

.skill-record {
    scroll-margin-top: 20px;
}

.skill-record-heading {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--ink-sepia);
}

.skill-record-heading .badge {
    display: inline-block;
    margin: 0 0 6px;
}

.skill-record-heading h3 {
    margin: 0;
    color: var(--ink-dark);
    font-family: "Old English Text MT", "Cloister Black", "Blackletter", serif;
    font-size: 1.9rem;
}

.skill-record-symbol {
    display: grid;
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    place-items: center;
    border: 1px solid var(--ink-sepia);
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    color: var(--accent-crimson);
    font-size: 1.7rem;
}

.skill-record-intro {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
    gap: 24px;
    margin-bottom: 22px;
}

.skill-record-intro h4 {
    margin: 0 0 8px;
    color: var(--ink-dark);
    font-size: 1.1rem;
}

.skill-record-intro p {
    margin: 0;
    line-height: 1.55;
}

.skill-gear-note {
    padding: 14px 16px;
    border-left: 4px solid var(--accent-crimson);
    background: rgba(255,255,255,0.18);
}

.skill-progression-wrap {
    width: 100%;
    overflow-x: auto;
}

.skill-progression-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    table-layout: fixed;
    color: var(--ink-dark);
}

.skill-progression-table caption {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skill-progression-table th,
.skill-progression-table td {
    padding: 11px 12px;
    border-bottom: 1px dotted rgba(0,0,0,0.24);
    text-align: left;
    vertical-align: top;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.skill-progression-table thead th {
    background: var(--ink-sepia);
    color: var(--bg-parchment);
    border-right: 1px solid rgba(255,255,255,0.3);
    text-align: center;
}

.skill-progression-table thead th:last-child {
    border-right: 0;
}

.skill-progression-table th:first-child {
    width: 10%;
    white-space: nowrap;
}

.skill-progression-table th:nth-child(2) {
    width: 20%;
}

.skill-progression-table th:nth-child(3) {
    width: 34%;
}

.skill-progression-table th:nth-child(4) {
    width: 36%;
}

.skill-progression-table tbody tr:hover {
    background: rgba(255,255,255,0.15);
}

.skill-source {
    margin: 16px 0 0;
    text-align: right;
    font-size: 0.9rem;
}

.skill-source a {
    color: var(--accent-crimson);
    font-weight: bold;
}

.skills-data-note {
    margin: 26px 0 0;
    color: var(--ink-sepia);
    text-align: center;
    font-size: 0.9rem;
    font-style: italic;
}
/* ========================================================================== 
   8. 3D CARD MECHANICS & REVERSE ROTATION (PRISTINE FALLBACK)
   ========================================================================== */
.flip-card {
    background-color: transparent;
    height: 380px;
    perspective: 1000px;
    cursor: pointer;
    position: relative;
}

/* Base state for the inner card container */
.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    /* Force !important to ensure no rogue animations override the transform */
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
    transform-style: preserve-3d;
    box-shadow: 2px 4px 10px rgba(0,0,0,0.12);
}

/* Explicitly trigger rotation on hover */
.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg) !important;
}

/* Card faces base rules */
.card-front, .card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 25px;
    border: var(--border-style);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    
    /* Hardware acceleration fixes */
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
}

/* Front Face settings */
.card-front {
    background-color: var(--bg-parchment-dark);
    z-index: 2; /* Ensures front sits on top initially */
    transform: rotateY(0deg); /* Forces layer state calculation */
}

/* Back Face settings */
.card-back {
    background-color: #dfce9f;
    text-align: left;
    transform: rotateY(180deg); /* Pre-flipped face */
    z-index: 1;
}

/* Dynamic Hover effects for layers */
.flip-card:hover .card-front {
    background-color: #dfce9f;
}

/* --- LEAF COMPONENT STYLES --- */
.badge {
    align-self: center;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 12px;
    border: 1px solid var(--ink-sepia);
    font-weight: bold;
    margin-top: -5px;
}
.badge-monster { color: var(--accent-crimson); border-color: var(--accent-crimson); }
.badge-friendly { color: var(--accent-emerald); border-color: var(--accent-emerald); }

.card-front h3 {
    font-size: 1.5rem;
    margin: 10px 0;
    color: var(--ink-dark);
}

.sketch-placeholder {
    flex: 1;
    margin: 10px 0;
    border: 1px dashed var(--ink-sepia);
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
    color: var(--ink-sepia);
    background: rgba(0,0,0,0.02);
}

.card-back h4 {
    margin: 0 0 12px 0;
    color: var(--ink-dark);
    font-size: 1.25rem;
    text-align: center;
    border-bottom: 1px solid var(--ink-sepia);
    padding-bottom: 5px;
}

.stats-list {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.9rem;
    line-height: 1.5;
}

.stats-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    border-bottom: 1px dotted rgba(0,0,0,0.1);
}

.left-span {
  flex: 1;             /* Takes up equal space on the left */
  text-align: left;
}

.middle-span {
  flex: 0 0 auto;      /* Stays perfectly centered */
  text-align: center;
}

.right-span {
  flex: 1;             /* Takes up equal space on the right */
  text-align: right;
}

.card-hint {
    font-size: 0.8rem;
    font-style: italic;
    color: var(--ink-sepia);
    text-align: center;
    margin: 0;
    opacity: 0.7;
}

/* ==========================================================================
   9. MOBILE RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 768px) {
    html {
        overflow-x: hidden;
    }

    body {
        min-width: 0;
        overflow-x: hidden;
    }

    img,
    video {
        max-width: 100%;
        height: auto;
    }

    .nav-container {
        display: block;
        padding: 8px 10px;
        text-align: left;
    }

    .mobile-menu-toggle {
        width: 100%;
        min-height: 44px;
        padding: 8px 12px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        background: #574530;
        border: 1px solid #dfce9f;
        color: #fff8df;
        cursor: pointer;
        font: inherit;
        font-weight: bold;
        letter-spacing: 0.04em;
    }

    .mobile-menu-toggle:focus-visible {
        outline: 2px solid #ffe49a;
        outline-offset: 2px;
    }

    .mobile-menu-icon {
        width: 24px;
        display: grid;
        gap: 4px;
    }

    .mobile-menu-icon span {
        display: block;
        height: 2px;
        background: currentColor;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .mobile-menu-toggle.is-open .mobile-menu-icon span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .mobile-menu-toggle.is-open .mobile-menu-icon span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.is-open .mobile-menu-icon span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .primary-navigation {
        display: none;
        max-height: calc(100vh - 160px);
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .primary-navigation.is-open {
        display: block;
    }

    header nav ul {
        width: 100%;
        padding-top: 7px;
        flex-direction: column;
        gap: 2px;
    }

    header nav ul li,
    header nav ul li a {
        width: 100%;
        box-sizing: border-box;
    }

    header nav ul li a {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 10px 12px;
        border: 1px solid transparent;
        border-bottom: 1px solid #6f5a3d;
    }

    header nav ul li a:hover,
    header nav ul li a.active {
        border: 1px solid #6f5a3d;
        border-left: 4px solid var(--accent-crimson);
    }

    .content-wrapper {
        padding: 14px 8px;
    }

    main {
        min-width: 0;
        padding: 24px 12px;
        box-shadow: inset 0 0 22px rgba(0,0,0,0.13);
    }

    .hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
        margin-bottom: 32px;
        padding-bottom: 32px;
    }

    .hero-text h2 {
        font-size: clamp(1.8rem, 9vw, 2.25rem);
    }

    .hero-text p {
        font-size: 1rem;
    }

    .drop-cap {
        font-size: 3.5rem;
    }

    .hero-map {
        max-width: 220px;
    }

    .section-header {
        margin-bottom: 26px;
        padding-bottom: 18px;
    }

    .section-title {
        margin-bottom: 28px;
        font-size: clamp(1.45rem, 7vw, 1.85rem);
        overflow-wrap: anywhere;
    }

    .top-filter-menu {
        display: grid;
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .top-filter-menu li a {
        width: 100%;
        min-height: 42px;
        box-sizing: border-box;
        padding: 10px 12px;
    }

    .server-status-container {
        padding: 8px 12px;
        gap: 8px;
    }

    .server-status-list {
        justify-content: flex-start;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .server-status-item {
        scroll-snap-align: start;
    }

    .server-status-close {
        flex-basis: 38px;
        width: 38px;
        height: 38px;
    }

    .grid-container,
    .skills-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .roster-grid {
        grid-template-columns: minmax(0, 1fr);
        max-height: 70vh;
        gap: 20px;
        padding: 4px 10px 4px 4px;
    }

    .roster-card,
    .skill-record {
        padding: 16px;
    }

    .roster-card-heading h3,
    .roster-card-class,
    .skill-record-heading h3 {
        font-size: 1.45rem;
        overflow-wrap: anywhere;
    }

    .stats-list li {
        flex-wrap: wrap;
        gap: 4px 10px;
    }

    .stats-list .left-span {
        flex: 1 0 100%;
    }

    .stats-list .middle-span,
    .stats-list .right-span {
        flex: 1 1 calc(50% - 5px);
    }

    .stats-list .middle-span {
        text-align: left;
    }

    .stats-list .right-span {
        text-align: right;
    }

    .skill-record-intro {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .skill-record {
        scroll-margin-top: 150px;
    }

    .skill-record-heading {
        align-items: flex-start;
    }

    .skill-record-symbol {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
    }

    .skill-progression-wrap,
    .item-table-wrapper,
    .npc-table-wrapper,
    .roster-table-wrapper {
        max-width: 100%;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-gutter: stable;
    }

    .skill-progression-table,
    .item-table,
    .npc-table,
    .roster-table {
        min-width: 700px;
    }

    .item-index-controls,
    .npc-grid-controls,
    .roster-controls {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .item-search-row,
    .npc-search-row,
    .roster-filter-row {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    input,
    select,
    textarea,
    button {
        max-width: 100%;
        box-sizing: border-box;
        font-size: 16px;
    }

    button,
    select,
    input[type="search"],
    input[type="text"],
    input[type="number"] {
        min-height: 44px;
    }

    .item-record-card,
    .npc-record-card {
        padding: 14px !important;
    }

    .item-record-heading,
    .npc-record-heading {
        align-items: flex-start !important;
        flex-direction: column;
    }

    .item-record-details,
    .npc-record-details,
    .npc-related-item-list {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .item-record-field,
    .npc-record-field {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .home-site-search {
        margin-bottom: 18px !important;
        padding: 14px !important;
    }

    .home-search-results {
        right: 14px !important;
        left: 14px !important;
        max-height: min(360px, 55vh) !important;
    }

    pre,
    code {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    footer {
        padding-right: 12px;
        padding-left: 12px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    main {
        padding: 20px 9px;
        border-right-width: 1px;
        border-left-width: 1px;
    }

    .content-wrapper {
        padding: 10px 4px;
    }

    .server-status-container {
        padding: 7px 8px;
    }

    .server-status-item {
        padding: 5px 8px;
        font-size: 0.78rem;
    }

    .roster-card,
    .skill-record,
    .item-record-card,
    .npc-record-card {
        padding: 12px !important;
    }

    .cta-btn {
        width: 100% !important;
        box-sizing: border-box;
        padding: 13px 16px;
        text-align: center;
    }

    .skill-progression-table,
    .item-table,
    .npc-table,
    .roster-table {
        min-width: 640px;
    }
}

/* Shared item, NPC and monster artwork */
.entity-name-with-image {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.entity-thumbnail {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 1px 1px rgba(61, 48, 32, 0.35));
}

.entity-sprite-frame {
    display: block;
    background-repeat: no-repeat;
    background-position: left top;
    background-size: var(--sprite-sheet-width, 100%) var(--sprite-sheet-height, 100%);
    image-rendering: pixelated;
}

.entity-sprite-animated {
    animation: entity-sprite-sheet var(--sprite-duration, 900ms)
        steps(var(--sprite-frame-count, 1), jump-none) infinite;
}

@keyframes entity-sprite-sheet {
    from {
        background-position: left top;
    }

    to {
        background-position: right top;
    }
}

.entity-frame-sequence {
    transition: opacity 90ms linear;
}

.entity-sprite-frame-thumbnail {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    filter: drop-shadow(0 1px 1px rgba(61, 48, 32, 0.35));
}

.entity-sprite-frame-detail {
    width: min(768px, 100%);
    aspect-ratio: 1;
    filter: drop-shadow(0 3px 4px rgba(61, 48, 32, 0.4));
}

/* Elite monsters reuse the base sprite with a subtle red colour treatment.
   Scoped to actual artwork, not monster names, links or surrounding UI. */
.entity-elite-tint {
    filter: sepia(0.75) saturate(2.8) hue-rotate(315deg)
        drop-shadow(0 2px 2px rgba(120, 26, 26, 0.42));
}

.entity-detail-gallery {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 0 0 20px;
    padding: 14px;
    background: rgba(61, 48, 32, 0.06);
    border: 1px solid rgba(61, 48, 32, 0.25);
}

.entity-detail-figure {
    display: grid;
    place-items: center;
    width: min(880px, 100%);
    min-height: min(720px, 70vw);
    margin: 0;
}

.entity-detail-image {
    display: block;
    max-width: 840px;
    max-height: 840px;
    width: auto;
    height: auto;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 3px 4px rgba(61, 48, 32, 0.4));
}

@media (max-width: 650px) {
    .entity-thumbnail {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .entity-sprite-frame-thumbnail {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .entity-sprite-frame-detail {
        width: min(640px, 100%);
    }

    .entity-detail-figure {
        width: min(680px, 100%);
        min-height: min(580px, 75vw);
    }

    .entity-detail-image {
        max-width: 640px;
        max-height: 640px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .entity-sprite-animated {
        animation: none;
        background-position: left top;
    }
}
/* ==========================================================================
   QUICK SEARCH, TOOLBOX & DATA GUIDANCE
   ========================================================================== */








    color: var(--ink-dark);
}

    background: #fffaf0;
    border: 1px solid #8a7454;
}

.search-open { overflow: hidden; }




.tools-jump-nav,
.saved-entry-columns,
.tool-stat-grid {
    display: flex;
    gap: 12px;
}












/* Player Hub */
.player-hub-hero { display:block; text-align:left; padding-bottom:8px; }
.player-hub-hero > div { max-width:800px; margin-inline:auto; text-align:center; }
.player-hub { margin:16px 0 26px; scroll-margin-top:110px; }
.player-hub-account { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:18px 20px; border:1px solid #8f7853; border-radius:10px; background:linear-gradient(135deg,rgba(255,255,255,.48),rgba(231,216,174,.42)); }
.player-hub-account-copy { min-width:0; flex:1 1 auto; }
.player-hub-account-copy h2 { margin:.15rem 0 .45rem; }
.player-hub-account-copy p:last-child { margin-bottom:0; }
.player-hub-account-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; flex:0 0 auto; }
.player-hub-account-actions .button-link { display:inline-flex; align-items:center; justify-content:center; min-height:42px; padding:8px 13px; border:1px solid #5c462a; border-radius:6px; background:#eadfbd; color:var(--ink-dark); text-decoration:none; font-weight:700; box-sizing:border-box; }
.player-hub-account-actions .button-link.primary { background:var(--accent-emerald); color:#fff; border-color:var(--accent-emerald); }
.player-hub-status-row { display:flex; flex-wrap:wrap; gap:7px; margin:.35rem 0 .55rem; }
.hub-status { display:inline-flex; align-items:center; min-height:28px; padding:3px 9px; border:1px solid #8f8170; border-radius:999px; background:#eee7d7; font-size:.78rem; font-weight:700; }
.hub-status::before { content:''; width:.52rem; height:.52rem; margin-right:.38rem; border-radius:50%; background:#746e66; }
.hub-status.is-ok::before { background:#278b49; }
.hub-status.is-working::before { background:#356f9f; }
.hub-status.is-warning::before { background:#b7791f; }
.hub-status.is-error::before { background:#b33a3a; }
.player-hub-quick-find { position:relative; z-index:12; margin:12px 0; padding:14px 16px; border:1px solid #8f7853; border-radius:10px; background:rgba(255,255,255,.42); }
.player-hub-quick-find > label { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:7px; }
.player-hub-quick-find__title { font-weight:800; }
.player-hub-quick-find__hint { font-size:.78rem; opacity:.72; text-align:right; }
.player-hub-quick-find__control { position:relative; display:flex; align-items:center; gap:8px; }
.player-hub-quick-find__icon { position:absolute; left:12px; font-size:1.15rem; pointer-events:none; opacity:.72; }
.player-hub-quick-find input[type="search"] { width:100%; min-height:46px; padding:10px 74px 10px 38px; border:1px solid #7a6547; border-radius:8px; background:#fffaf0; color:var(--ink-dark); font:inherit; box-sizing:border-box; }
.player-hub-quick-find input[type="search"]:focus { outline:3px solid rgba(47,111,83,.2); border-color:var(--accent-emerald); }
.player-hub-quick-find__control button { position:absolute; right:6px; min-height:34px; padding:5px 10px; border:0; border-radius:6px; background:#e7d8ae; color:var(--ink-dark); font:inherit; font-size:.8rem; cursor:pointer; }
.player-hub-quick-results { position:absolute; top:calc(100% - 8px); left:16px; right:16px; max-height:min(55vh,430px); overflow-y:auto; overscroll-behavior:contain; border:1px solid #7a6547; border-radius:8px; background:#fffaf0; box-shadow:0 12px 30px rgba(55,42,25,.22); }
.player-hub-quick-results > a { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:52px; padding:9px 12px; border-bottom:1px solid rgba(122,101,71,.25); color:var(--ink-dark); text-decoration:none; }
.player-hub-quick-results > a:last-child { border-bottom:0; }
.player-hub-quick-results > a:hover,.player-hub-quick-results > a:focus-visible { background:#eee2bd; outline:none; }
.player-hub-quick-result__copy { min-width:0; }
.player-hub-quick-result__copy strong,.player-hub-quick-result__copy small { display:block; }
.player-hub-quick-result__copy small { margin-top:2px; opacity:.72; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.player-hub-quick-kind { flex:0 0 auto; padding:3px 7px; border:1px solid #a28b62; border-radius:999px; background:#f1e7c9; font-size:.7rem; font-weight:800; text-transform:uppercase; letter-spacing:.03em; }
.player-hub-quick-empty { padding:14px; font-size:.9rem; opacity:.78; }

.player-hub-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:12px 0; }
.player-hub-stat { padding:11px 13px; border:1px solid rgba(122,101,71,.55); border-radius:7px; background:rgba(255,255,255,.3); min-width:0; }
.player-hub-stat span,.player-hub-stat strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.player-hub-stat span { font-size:.76rem; opacity:.75; }
.player-hub-stat strong { margin-top:3px; font-size:1rem; }
.player-hub-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.player-hub-panel { display:flex; flex-direction:column; min-width:0; padding:16px; border:1px solid #9b865f; border-radius:8px; background:rgba(255,255,255,.27); }
.player-hub-panel h3 { margin:.15rem 0 .4rem; }
.player-hub-panel p { margin:.15rem 0 .8rem; font-size:.92rem; }
.player-hub-icon { font-size:1.45rem; line-height:1; }
.player-hub-links { display:flex; flex-wrap:wrap; gap:7px; margin-top:auto; }
.player-hub-links a { display:inline-flex; align-items:center; min-height:36px; padding:5px 9px; border:1px solid #9f8c68; border-radius:999px; background:#f1e7c9; color:var(--ink-dark); text-decoration:none; font-size:.84rem; font-weight:700; }
.player-hub-links a:hover,.player-hub-links a:focus-visible,.tools-jump-nav a:hover,.tools-jump-nav a:focus-visible { background:#dfcfa2; }

.tools-hero { text-align: center; }
.tools-jump-nav { flex-wrap: wrap; justify-content: center; margin: 20px 0 28px; }
.tools-jump-nav a { padding: 9px 13px; border: 1px solid #7a6547; border-radius: 999px; background: #eee2bd; color: var(--ink-dark); text-decoration: none; }
.tool-card { margin: 24px 0; padding: 24px; border: 1px solid #9b865f; border-radius: 8px; background: rgba(255,255,255,.28); scroll-margin-top: 110px; }
.tool-card h2 { margin-top: 0; }
.tool-form-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(210px,1fr)); gap: 14px; }
.tool-form-grid label,.tool-feedback-form label { display: grid; gap: 6px; font-weight: bold; }
.tool-form-grid input,.tool-form-grid select,.tool-feedback-form input,.tool-feedback-form textarea { width: 100%; padding: 10px; border: 1px solid #8d7958; border-radius: 4px; background: #fffaf0; box-sizing: border-box; font: inherit; }
.tool-form-grid .tool-check { display: flex; align-items: center; font-weight: normal; }
.tool-form-grid .tool-check input { width: auto; }
.tool-result { min-height: 44px; margin-top: 18px; padding: 16px; border-left: 4px solid var(--accent-emerald); background: rgba(255,255,255,.38); }
.tool-result a { color: #5f1e1e; }
.tool-stat-grid { flex-wrap: wrap; }
.tool-stat-grid > div { flex: 1 1 150px; padding: 12px; text-align: center; background: #eadfbd; }
.tool-stat-grid span,.tool-stat-grid strong { display: block; }
.tool-stat-grid strong { margin-top: 5px; font-size: 1.2rem; }
.tool-table-wrap { overflow-x: auto; }
.tool-table-wrap table { width: 100%; border-collapse: collapse; }
.tool-table-wrap th,.tool-table-wrap td { padding: 9px; border: 1px solid #aa9876; text-align: left; }
.saved-entry-columns > div { flex: 1; }
.data-badge { display: inline-block; padding: 3px 8px; border-radius: 999px; color: white; font-size: .78rem; font-weight: bold; }
.data-badge.confirmed { background: #276738; }
.data-badge.extrapolated { background: #8a630d; }
.data-badge.incomplete { background: #8c2626; }
.data-badge.rare { background: #6a3581; }
.tool-feedback-form { display: grid; gap: 14px; }
.tool-feedback-form button { justify-self: start; padding: 10px 18px; border: 1px solid #402d18; background: var(--accent-emerald); color: white; cursor: pointer; }
.feedback-trap { position: absolute; left: -10000px; }
.tool-message { padding: 12px; border-radius: 4px; }
.tool-message.success { background: #d9eedc; }
.tool-message.error { background: #f2d5d1; }
.advanced-tool-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(330px,1fr)); gap:18px; }
.advanced-tool-grid article { padding:16px; border:1px solid #aa9876; border-radius:6px; background:rgba(255,255,255,.24); }
.advanced-tool-grid button,.tool-actions button,.file-button,#addChecklist,#saveLoadout { margin:8px 6px 0 0; padding:8px 12px; border:1px solid #5c462a; border-radius:4px; background:#e7d8ae; color:var(--ink-dark); cursor:pointer; font:inherit; }
.checklist-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:6px; }
.tool-actions { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
.file-button input { position:absolute; inline-size:1px; block-size:1px; opacity:0; }
.upgrade-tree ul { margin-left:18px; padding-left:14px; border-left:1px solid #9b865f; }
.personal-checklist { list-style:none; padding:0; }
.personal-checklist li { display:flex; justify-content:space-between; gap:10px; padding:6px 0; border-bottom:1px solid #c8b88f; }

@media (max-width: 700px) {
    .player-hub-quick-find { padding:12px; }
    .player-hub-quick-find > label { display:block; }
    .player-hub-quick-find__hint { display:block; margin-top:2px; text-align:left; }
    .player-hub-quick-results { left:12px; right:12px; max-height:52vh; }
    .player-hub-quick-results > a { min-height:58px; }
    .player-hub-quick-result__copy small { white-space:normal; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
}

@media (max-width: 980px) {
    .player-hub-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .player-hub-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width: 620px) {
    .player-hub-account { align-items:stretch; flex-direction:column; padding:14px; }
    .player-hub-account-actions { justify-content:stretch; }
    .player-hub-account-actions .button-link { flex:1 1 130px; min-height:44px; }
    .player-hub-grid { grid-template-columns:minmax(0,1fr); }
    .player-hub-links a { min-height:44px; padding-inline:12px; }
    .player-hub-stats { gap:7px; }
    .tools-jump-nav { flex-wrap:nowrap; justify-content:flex-start; overflow-x:auto; padding:3px 0 9px; overscroll-behavior-inline:contain; -webkit-overflow-scrolling:touch; scrollbar-width:thin; }
    .tools-jump-nav a { flex:0 0 auto; min-height:42px; display:inline-flex; align-items:center; }
}

@media (max-width: 820px) {
    .nav-container { flex-wrap: wrap; }
    
    .tool-card { padding: 16px; }
    .saved-entry-columns { display: block; }
    
    
}



.mobile-filter-toggle { display:none; margin:8px auto; padding:8px 12px; }
.admin-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }

.admin-section-nav { position:sticky; top:8px; z-index:25; display:flex; gap:8px; max-width:100%; margin:10px 0 18px; padding:8px; overflow-x:auto; overscroll-behavior-inline:contain; -webkit-overflow-scrolling:touch; border:1px solid #9b865f; border-radius:8px; background:rgba(244,230,199,.96); box-shadow:0 4px 14px rgba(37,28,18,.12); scrollbar-width:thin; }
.admin-section-nav a { flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; min-height:40px; padding:5px 11px; border:1px solid #9b865f; border-radius:999px; background:#eee2bd; color:var(--ink-dark); text-decoration:none; font-size:.84rem; font-weight:700; white-space:nowrap; }
.admin-section-nav a:hover,.admin-section-nav a:focus-visible { background:#dfcfa2; }
.admin-section-nav ~ .tool-card .tool-table-wrap { max-width:100%; overflow-x:auto; overscroll-behavior-inline:contain; -webkit-overflow-scrolling:touch; }
.admin-section-nav ~ .tool-card .tool-table-wrap table { min-width:720px; }
#seller-verifications .tool-table-wrap table { min-width:1320px; }
#market-abuse-review .tool-table-wrap table,#market-disputes .tool-table-wrap table,#market-dispute-history .tool-table-wrap table { min-width:980px; }
#seller-verifications form input[type="text"],#market-risk-flags form input[type="text"],#market-risk-flags form input[type="email"],#market-disputes form input[type="text"] { min-height:42px; box-sizing:border-box; }

@media (max-width:700px) {
    .admin-heading { align-items:stretch; flex-direction:column; }
    .admin-heading form,.admin-heading button { width:100%; }
    .admin-section-nav { top:4px; margin-inline:-4px; border-radius:6px; }
    .admin-section-nav a { min-height:44px; padding-inline:13px; }
    #market-risk-flags > form { display:grid; gap:10px; }
    #market-risk-flags > form label { display:grid; gap:5px; }
    #market-risk-flags > form input { width:100%; }
}

.high-contrast body { background:#000; }
.high-contrast main { background:#fff; color:#000; }
.high-contrast a { color:#001f9c; text-decoration:underline; }
.high-contrast .tool-card,.high-contrast .tool-result { background:#fff; border-color:#000; }

.reduce-motion *,
.reduce-motion *::before,
.reduce-motion *::after { animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; scroll-behavior:auto !important; }
@media (prefers-reduced-motion: reduce) {
    *,*::before,*::after { animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; scroll-behavior:auto !important; }
}

@media (max-width: 700px) {
    .mobile-filter-toggle { display:block; }
    .mobile-collapsible-filters { display:none; }
    .mobile-collapsible-filters.is-open { display:block; }
    
}

/* RESPONSIVE DEVICE LAYER */
html { -webkit-text-size-adjust:100%; text-size-adjust:100%; }
body { min-width:0; overflow-x:clip; }
img,svg,video,canvas { max-width:100%; height:auto; }
input,select,textarea,button { max-width:100%; }
button,a,input,select,textarea { touch-action:manipulation; }
.content-wrapper,.nav-container,.server-status-container,main,section,article,aside,form { min-width:0; }
.content-wrapper { width:min(100% - 32px,1200px); box-sizing:border-box; }
.tool-card,.skill-record,.item-record-card,.npc-record-card,.roster-card { overflow-wrap:anywhere; }
.skill-combat-alternatives { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); gap:14px; margin-top:14px; }
.skill-combat-alternatives .skill-best-option-details { margin:0; align-content:start; }
.skill-combat-alternatives h5 { grid-column:1/-1; margin:0 0 4px; font-size:1.05rem; }
.tool-table-wrap,.skill-progression-wrap,.item-table-wrapper,.npc-table-wrapper { max-width:100%; overflow-x:auto; overscroll-behavior-inline:contain; -webkit-overflow-scrolling:touch; }

@media (hover:none),(pointer:coarse) {
    button,.cta-btn,.top-filter-menu a,.main-nav a,input[type="button"],input[type="submit"],select { min-height:44px; }
    input[type="checkbox"],input[type="radio"] { width:22px; height:22px; }
    
    .server-status-close { min-width:44px; min-height:44px; }
}

@media (max-width:1024px) {
    .nav-container { padding-inline:16px; }
    .content-wrapper { width:min(100% - 24px,1200px); }
    .hero { grid-template-columns:minmax(0,1fr) minmax(220px,.7fr); gap:22px; }
    .advanced-tool-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)); }
    
}

@media (max-width:768px) {
    body { font-size:16px; }
    .site-header,.main-header,header { max-width:100%; }
    .nav-container { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; padding:10px 12px; }
    .logo-container,.site-brand { min-width:0; }
    .primary-navigation { grid-column:1/-1; width:100%; }
    .main-nav { grid-column:1/-1; width:100%; overflow-x:auto; overscroll-behavior-inline:contain; scrollbar-width:thin; }
    .main-nav ul { display:flex; flex-wrap:nowrap; width:max-content; min-width:100%; margin:0; padding:0 0 4px; }
    .main-nav li { flex:0 0 auto; }
    .main-nav a { display:grid; place-items:center; padding:10px 12px; white-space:nowrap; }
    
    .server-status-container { padding:8px 8px 8px 12px; gap:6px; }
    .server-status-list { justify-content:flex-start; scroll-snap-type:x proximity; }
    .server-status-item { scroll-snap-align:start; }
    .content-wrapper { width:min(100% - 16px,1200px); margin-block:12px; padding:16px; border-radius:8px; }
    .hero,.skill-record-intro,.saved-entry-columns { grid-template-columns:1fr; display:grid; }
    .hero-map { order:-1; width:min(100%,430px); margin-inline:auto; }
    .grid-container,.roster-grid,.skills-grid { grid-template-columns:minmax(0,1fr); }
    .tool-form-grid { grid-template-columns:minmax(0,1fr); }
    .tool-stat-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
    .tool-stat-grid>div { min-width:0; }
    
    
    
    
    table { font-size:.92rem; }
    th,td { padding:8px; }
    .entry-drawer { box-sizing:border-box; width:100%; max-width:100%; padding:max(18px,env(safe-area-inset-top)) 18px max(18px,env(safe-area-inset-bottom)); }
    
    
    
}

@media (max-width:520px) {
    h1 { font-size:clamp(1.55rem,8vw,2.1rem); }
    h2 { font-size:clamp(1.35rem,7vw,1.8rem); }
    h3 { font-size:clamp(1.15rem,6vw,1.5rem); }
    .content-wrapper { width:100%; margin:0; padding:12px; border-inline:0; border-radius:0; }
    .server-status-item { padding:6px 8px; }
    .tool-card,.skill-record,.item-record-card,.npc-record-card,.roster-card { padding:12px; border-radius:5px; }
    .tool-stat-grid,.advanced-tool-grid,.checklist-grid,.skill-combat-alternatives { grid-template-columns:minmax(0,1fr); }
    .skill-xp-results,.skill-best-option-details,.skill-next-upgrade-details { grid-template-columns:minmax(0,1fr)!important; }
    .top-filter-menu { grid-template-columns:minmax(0,1fr); }
    .item-table,.npc-table,.skill-progression-table { min-width:620px; }
    
    
}

@media (max-height:540px) and (orientation:landscape) {
    
    
    .server-status-item { padding-block:3px; }
}

@media (prefers-contrast:more) {
    :focus-visible { outline:3px solid #005fcc!important; outline-offset:3px; }
    .tool-card,.skill-record,.item-record-card,.npc-record-card { border-width:2px; }
}

/* ==========================================================================\n   MARKETPLACE\n   ========================================================================== */
.marketplace-page { padding-block: 18px 34px; }
.market-shell { display: grid; gap: 24px; }
.market-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 4px; }
.market-hero h1 { margin: 3px 0 8px; }
.market-intro { max-width: 760px; margin: 0; font-size: 1.05rem; }
.market-account-actions { display: flex; gap: 10px; flex: 0 0 auto; }
.market-stat-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.market-stat-card { padding: 14px 16px; border: 1px solid #9b865f; border-radius: 7px; background: rgba(255,255,255,.24); }
.market-stat-card span,.market-stat-card strong { display: block; }
.market-stat-card span { font-size: .85rem; opacity: .8; }
.market-stat-card strong { margin-top: 4px; font-size: 1.55rem; line-height: 1; }
.market-toolbar-card { padding: 16px; border: 1px solid #9b865f; border-radius: 8px; background: rgba(255,255,255,.2); }
.market-filter-form { display: grid; grid-template-columns: minmax(220px,1fr) auto; align-items: end; gap: 14px; }
.market-filter-form label { display: grid; gap: 6px; font-weight: 700; }
.market-filter-form select,.market-create-form select,.market-create-form input,.market-bid-form input { width: 100%; box-sizing: border-box; padding: 10px 11px; border: 1px solid #8d7958; border-radius: 4px; background: #fffaf0; color: var(--ink-dark); font: inherit; }
.market-filter-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.market-filter-summary { margin: 10px 0 0; font-size: .92rem; }
.market-secondary-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; box-sizing: border-box; padding: 8px 13px; border: 1px solid #6e593c; border-radius: 4px; background: #eadfbd; color: var(--ink-dark); text-decoration: none; font: inherit; font-weight: 700; cursor: pointer; }
.market-secondary-btn:hover { background: #dfd0a6; }
.market-create-panel { border: 1px solid #8e7755; border-radius: 8px; background: rgba(255,255,255,.18); overflow: hidden; }
.market-create-panel > summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 15px 17px; cursor: pointer; font-weight: 700; background: rgba(129,102,64,.08); }
.market-create-panel > summary small { font-weight: 400; opacity: .76; }
.market-create-panel[open] > summary { border-bottom: 1px solid rgba(110,89,60,.35); }
.market-panel-body { padding: 16px; }
.market-create-form { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; padding: 17px; }
.market-create-form label { display: grid; gap: 6px; font-weight: 700; }
.market-form-note,.market-form-submit { grid-column: 1 / -1; }
.market-form-note { margin: 0; }
.market-form-submit { display: flex; justify-content: flex-start; }
.market-section { display: grid; gap: 14px; padding-top: 4px; }
.market-section + .market-section { margin-top: 4px; padding-top: 24px; border-top: 1px solid rgba(110,89,60,.28); }
.market-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.market-section-heading h2 { margin: 2px 0 4px; }
.market-section-heading p { margin: 0; }
.market-count-badge { flex: 0 0 auto; padding: 5px 10px; border: 1px solid #8f7856; border-radius: 999px; background: #eadfbd; font-size: .82rem; font-weight: 700; }
.market-item-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.market-item-card { display: flex; flex-direction: column; min-width: 0; padding: 16px; border: 1px solid #927b58; border-radius: 8px; background: rgba(255,250,240,.52); box-shadow: 0 2px 7px rgba(61,48,32,.09); }
.market-item-card:hover { box-shadow: 0 4px 12px rgba(61,48,32,.14); transform: translateY(-1px); }
.market-item-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.market-listing-badge { display: inline-flex; width: fit-content; padding: 3px 8px; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: #70552f; color: #fff8df; }
.market-listing-badge.is-auction { background: #6b3f72; }
.market-listing-badge.is-buy { background: #2f6844; }
.market-quantity { font-size: .82rem; font-weight: 700; opacity: .78; }
.market-item-card h3,.market-buy-order-card h3 { margin: 11px 0 10px; font-size: 1.18rem; line-height: 1.2; }
.market-price-block { display: grid; grid-template-columns: 1fr auto; align-items: end; column-gap: 8px; padding: 12px; border-radius: 6px; background: rgba(99,76,43,.08); }
.market-price-block span { font-size: .8rem; opacity: .74; }
.market-price-block strong { grid-row: 1 / span 2; grid-column: 2; font-size: 1.55rem; line-height: 1; }
.market-price-block small { font-size: .72rem; opacity: .68; }
.market-buyout-line { margin: 9px 0 0; font-size: .88rem; }
.market-meta-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 12px; margin: 14px 0; }
.market-meta-grid div { min-width: 0; }
.market-meta-grid dt { font-size: .72rem; font-weight: 700; text-transform: uppercase; opacity: .66; }
.market-meta-grid dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.market-meta-wide { grid-column: 1 / -1; }
.market-card-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(110,89,60,.25); }
.market-card-actions form { margin: 0; }
.market-card-actions .cta-btn,.market-card-actions .market-secondary-btn { min-height: 38px; }
.market-bid-form { display: flex; gap: 7px; flex: 1 1 100%; }
.market-bid-form input { min-width: 0; flex: 1; }
.market-empty-state { display: grid; gap: 4px; padding: 24px; border: 1px dashed #9b865f; border-radius: 8px; text-align: center; background: rgba(255,255,255,.16); }
.market-empty-state.compact { padding: 16px; }
.market-buy-order-grid { display: grid; gap: 10px; }
.market-buy-order-card { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(170px,auto); align-items: center; gap: 18px; padding: 14px 16px; border: 1px solid #927b58; border-radius: 8px; background: rgba(255,250,240,.42); }
.market-buy-order-card p { margin: 0; }
.market-buy-order-offer { display: grid; justify-items: end; }
.market-buy-order-offer span { font-size: .76rem; opacity: .7; }
.market-buy-order-offer strong { font-size: 1.3rem; }
.market-buy-order-actions { display: grid; justify-items: end; gap: 7px; }
.market-buy-order-actions small { opacity: .72; }
.market-buy-order-actions form { margin: 0; }

@media (max-width: 980px) {
    .market-item-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .market-create-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .market-buy-order-card { grid-template-columns: minmax(0,1fr) auto; }
    .market-buy-order-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; }
}

@media (max-width: 700px) {
    .market-hero,.market-section-heading { align-items: stretch; flex-direction: column; }
    .market-account-actions .cta-btn { width: 100%; box-sizing: border-box; text-align: center; }
    .market-stat-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .market-filter-form { grid-template-columns: 1fr; }
    .market-filter-actions > * { flex: 1 1 auto; }
    .market-create-panel > summary { align-items: flex-start; flex-direction: column; }
    .market-create-form { grid-template-columns: 1fr; }
    .market-form-note,.market-form-submit { grid-column: auto; }
    .market-item-grid { grid-template-columns: 1fr; }
    .market-count-badge { align-self: flex-start; }
    .market-buy-order-card { grid-template-columns: 1fr; align-items: start; }
    .market-buy-order-offer { justify-items: start; }
    .market-buy-order-actions { grid-column: auto; align-items: stretch; flex-direction: column; }
}

@media (max-width: 480px) {
    .market-stat-grid { grid-template-columns: 1fr; }
    .market-stat-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .market-stat-card strong { margin: 0; }
    .market-meta-grid { grid-template-columns: 1fr; }
    .market-meta-wide { grid-column: auto; }
    .market-bid-form { flex-direction: column; }
}

/* Marketplace listing view switch and compact plain-grid view */
.market-section-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.market-view-toggle {
    display: inline-flex;
    align-items: center;
    padding: 2px;
    border: 1px solid #8f7856;
    border-radius: 6px;
    background: rgba(255,255,255,.22);
}

.market-view-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 11px;
    border-radius: 4px;
    color: var(--ink-dark);
    text-decoration: none;
    font-size: .86rem;
    font-weight: 700;
}

.market-view-option:hover,
.market-view-option.is-active {
    background: #70552f;
    color: #fff8df;
}

.market-listing-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid #927b58;
    border-radius: 7px;
    background: rgba(255,250,240,.42);
    -webkit-overflow-scrolling: touch;
}

.market-listing-table {
    width: 100%;
    min-width: 1050px;
    border-collapse: collapse;
    color: var(--ink-dark);
    font-size: .9rem;
}

.market-listing-table th,
.market-listing-table td {
    padding: 9px 10px;
    border-bottom: 1px solid rgba(110,89,60,.24);
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.market-listing-table thead th {
    background: #5c4a37;
    color: #fff8df;
    font-size: .78rem;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.market-listing-table tbody tr:nth-child(even) {
    background: rgba(110,89,60,.055);
}

.market-listing-table tbody tr:hover {
    background: rgba(140,38,38,.07);
}

.market-listing-table tbody tr:last-child td {
    border-bottom: 0;
}

.market-grid-actions {
    min-width: 150px;
}

.market-grid-actions form {
    margin: 0;
}

.market-grid-actions .cta-btn,
.market-grid-actions .market-secondary-btn {
    width: auto;
    min-height: 34px;
    margin: 0;
    padding: 5px 10px;
    font-size: .84rem;
    box-shadow: none;
}

.market-grid-action-stack {
    display: flex;
    align-items: center;
    gap: 6px;
}

.market-grid-bid-form {
    display: flex;
    align-items: center;
    gap: 5px;
}

.market-grid-bid-form input[type="number"] {
    width: 88px;
    min-height: 34px;
    box-sizing: border-box;
    padding: 6px 7px;
    border: 1px solid #8d7958;
    border-radius: 4px;
    background: #fffaf0;
    color: var(--ink-dark);
    font: inherit;
}

@media (max-width: 700px) {
    .market-section-controls {
        justify-content: flex-start;
    }

    .market-view-toggle {
        width: 100%;
    }

    .market-view-option {
        flex: 1 1 50%;
    }
}

/* Server-region flag SVG backgrounds copied from npm flag-icons into /assets/flags */
.server-status-item {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.server-status-item::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: var(--server-flag-image, none);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0.34;
    filter: saturate(0.9) contrast(1.05);
    pointer-events: none;
    user-select: none;
}

.server-status-item > * {
    position: relative;
    z-index: 1;
}

.server-status-item.is-boosted-server::before { opacity: 0.24; }
.server-status-item.is-test-boost-server::before { opacity: 0.2; }

@media (max-width: 768px) {
    .server-status-item::before { opacity: 0.3; }
    .server-status-item.is-boosted-server::before { opacity: 0.22; }
    .server-status-item.is-test-boost-server::before { opacity: 0.18; }
}


/* Make the US flag easier to distinguish against the dark server card. */
.server-status-item[data-server-flag-code="us"]::before {
    opacity: 0.48;
}
.server-status-item.is-boosted-server[data-server-flag-code="us"]::before {
    opacity: 0.36;
}

/* =========================================================
   Boosted server prominence
   Makes live boosted servers unmistakable without changing
   server-status markup or refresh behaviour.
   ========================================================= */
.server-status-item.is-boosted-server {
    z-index: 4;
    transform: scaleX(1.08) scaleY(1.008);
    margin-inline: 7px;
    padding: 5px 13px;
    border: 2px solid #ffd75a;
    border-radius: 8px;
    background:
        linear-gradient(125deg, rgba(72, 40, 0, 0.96), rgba(150, 91, 0, 0.98) 42%, rgba(92, 49, 0, 0.96) 72%, rgba(181, 112, 0, 0.98));
    background-size: 260% 260%;
    box-shadow:
        0 0 0 1px rgba(255, 244, 190, 0.34),
        0 0 12px rgba(255, 214, 71, 0.85),
        0 0 26px rgba(255, 158, 0, 0.62),
        0 0 42px rgba(255, 112, 0, 0.32);
    animation: boosted-server-celebration 2.2s linear infinite;
    will-change: background-position;
}

.server-status-item.is-boosted-server::before {
    opacity: 0.18;
    filter: saturate(1.15) contrast(1.08) brightness(0.88);
}

/* Sparkle / small-firework layer. Multiple radial gradients keep this
   lightweight and avoid adding DOM nodes to every refreshed server card. */
.server-status-item.is-boosted-server::after {
    content: "";
    position: absolute;
    inset: -18%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.9;
    background:
        radial-gradient(circle at 12% 28%, #fff 0 1px, #ffe58a 2px, transparent 4px),
        radial-gradient(circle at 84% 20%, #fff 0 1px, #ffd34e 2px, transparent 4px),
        radial-gradient(circle at 72% 78%, #fff 0 1px, #ffb524 2px, transparent 4px),
        radial-gradient(circle at 24% 82%, #fff 0 1px, #ffe790 2px, transparent 4px),
        radial-gradient(circle at 48% 9%, #fff 0 1px, #ffc933 2px, transparent 3px),
        radial-gradient(circle at 94% 56%, #fff 0 1px, #fff0aa 2px, transparent 4px),
        radial-gradient(circle at 7% 65%, #fff 0 1px, #ffcb36 2px, transparent 4px),
        radial-gradient(circle at 54% 56%, rgba(255,255,255,0.9) 0 1px, rgba(255,205,74,0.7) 2px, transparent 5px),
        conic-gradient(from 0deg at 18% 25%, transparent 0 12%, rgba(255,228,120,0.75) 13% 14%, transparent 15% 25%, rgba(255,179,36,0.65) 26% 27%, transparent 28% 100%),
        conic-gradient(from 20deg at 82% 70%, transparent 0 10%, rgba(255,240,170,0.7) 11% 12%, transparent 13% 23%, rgba(255,160,20,0.6) 24% 25%, transparent 26% 100%);
    filter: drop-shadow(0 0 4px rgba(255, 213, 70, 0.9));
    animation: boosted-server-sparkles 1.8s linear infinite;
    will-change: transform, opacity;
}

.server-status-item.is-boosted-server .server-name {
    color: #fff8cf;
    font-weight: 900;
    letter-spacing: 0.025em;
    text-shadow:
        0 1px 1px rgba(0, 0, 0, 0.8),
        0 0 7px rgba(255, 222, 100, 0.9);
}

.server-status-item.is-boosted-server .boost-status.is-boosted {
    color: #2e1800;
    background: linear-gradient(180deg, #fff5b5 0%, #ffd449 52%, #ffad18 100%);
    border: 1px solid rgba(255, 247, 196, 0.95);
    border-radius: 999px;
    padding: 2px 8px;
    font-weight: 900;
    letter-spacing: 0.055em;
    text-transform: uppercase;
    box-shadow:
        0 0 8px rgba(255, 233, 138, 0.85),
        0 0 15px rgba(255, 166, 0, 0.55);
    animation: boosted-status-pulse 1.15s ease-in-out infinite alternate;
    will-change: transform, filter;
}

.server-status-item.is-boosted-server .online-users {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}

@keyframes boosted-server-celebration {
    0% { background-position: 0% 50%; }
    25% { background-position: 42% 42%; }
    50% { background-position: 100% 50%; }
    75% { background-position: 58% 58%; }
    100% { background-position: 0% 50%; }
}

@keyframes boosted-server-sparkles {
    0% {
        opacity: 0.50;
        transform: translate3d(-1.5%, 1%, 0) scale(0.98) rotate(-0.6deg);
    }
    20% {
        opacity: 0.78;
        transform: translate3d(0.5%, -0.8%, 0) scale(1.01) rotate(0.2deg);
    }
    40% {
        opacity: 1;
        transform: translate3d(1.6%, -1.4%, 0) scale(1.03) rotate(0.7deg);
    }
    60% {
        opacity: 0.82;
        transform: translate3d(0.8%, 0.4%, 0) scale(1.015) rotate(0.1deg);
    }
    80% {
        opacity: 0.66;
        transform: translate3d(-0.8%, 1.2%, 0) scale(1.005) rotate(-0.3deg);
    }
    100% {
        opacity: 0.50;
        transform: translate3d(-1.5%, 1%, 0) scale(0.98) rotate(-0.6deg);
    }
}

@keyframes boosted-status-pulse {
    from {
        transform: scale(1);
        filter: brightness(1);
    }
    to {
        transform: scale(1.06);
        filter: brightness(1.12);
    }
}

@media (max-width: 768px) {
    .server-status-item.is-boosted-server {
        transform: scaleX(1.045) scaleY(1.004);
        margin-inline: 4px;
        padding: 5px 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .server-status-item.is-boosted-server,
    .server-status-item.is-boosted-server::after,
    .server-status-item.is-boosted-server .boost-status.is-boosted {
        animation: none;
    }

    .server-status-item.is-boosted-server {
        background: #82530a;
        box-shadow:
            0 0 0 1px rgba(255, 244, 190, 0.4),
            0 0 18px rgba(255, 196, 55, 0.72);
    }
}

/* 2026-10-08 marketplace creation and partial-quantity controls */
.market-account-actions { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.market-new-listing-btn { font-size:1.07rem; font-weight:800; border:2px solid currentColor; box-shadow:0 3px 0 rgba(0,0,0,.15); text-align:center; }
.market-new-listing-btn:focus-visible,.market-create-panel > summary:focus-visible { outline:3px solid #76561f; outline-offset:3px; }
.market-create-panel { scroll-margin-top:85px; border-width:2px; border-color:#826339; }
.market-create-panel > summary { font-size:1.04rem; background:rgba(135,104,55,.20); }
.market-quantity-action { display:flex; gap:7px; flex-wrap:wrap; align-items:center; }
.market-quantity-action label { display:flex; align-items:center; gap:5px; font-size:.85rem; font-weight:700; }
.market-quantity-action input[type=number] { width:70px; min-width:65px; max-width:85px; }
.market-quantity-action button { white-space:nowrap; }
.marketplace-page .notice-error { border:2px solid #9d4230; background:#fff0e8; color:#642218; padding:12px 16px; }
.marketplace-page .notice-error a { color:#642218; font-weight:700; text-decoration:underline; }
@media (max-width:650px) { .market-account-actions { width:100%; } .market-account-actions > * { flex:1 1 auto; } .market-quantity-action { align-items:stretch; } }

/* Private trade activity: only fetched for the signed-in market account. */
.player-hub-market-activity,.market-active-transactions { border:1px solid var(--border-color,#9a8363); border-radius:9px; padding:15px; margin:14px 0; background:rgba(240,223,186,.17); }
.market-activity-title { display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap; }
.market-activity-title h2,.market-activity-title h3 { margin:0; font-size:1.14rem; }
.market-activity-list { padding:0;list-style:none;display:grid;gap:6px;margin:12px 0 0; }
.market-activity-list li { display:flex;gap:12px;flex-wrap:wrap;justify-content:space-between;border-bottom:1px solid rgba(120,100,75,.3);padding:6px 0; }
.market-activity-list strong { font-variant-numeric:tabular-nums; }

/* EoP.Life guild guides use the site's parchment and dark-ink palette.
   Extra specificity wins over legacy page-local dark-panel rules. */
body .guide-shell { color:var(--ink-dark,#2b2216); }
body .guide-shell .guide-hero,body .guide-shell .guide-section,body .guide-shell .guide-card { background:var(--bg-parchment,#f4edd2); color:var(--ink-dark,#2b2216); border:2px solid #9b865d; box-shadow:0 4px 16px rgba(0,0,0,.18); }
body .guide-shell .guide-grid article { background:var(--bg-parchment-dark,#e6dcbc); color:var(--ink-dark,#2b2216); border:1px solid #c8b88d; }
body .guide-shell .guide-hero h1,body .guide-shell .guide-section h1,body .guide-shell .guide-section h2,body .guide-shell .guide-card h2,body .guide-shell p,body .guide-shell li { color:var(--ink-dark,#2b2216); }
body .guide-shell a { color:#642620; text-decoration:underline; }
body .guide-shell .guide-nav a,body .guide-shell .guide-card a { background:#eadbb5; border:1px solid #987c4f; color:#4f281c; }
body .guide-shell a:hover,body .guide-shell a:focus-visible { background:#e8d0a1; color:#401b10; outline-offset:3px; }
body .guide-shell code { background:#e9d7b1; border:1px solid #c9ab78; color:#371e12; border-radius:4px; padding:1px 4px; }
