/* =============================================
   RuneClicker — OSRS-inspired, iPad-first
   ============================================= */

@font-face {
    font-family: 'RS Plain';
    src: url('../fonts/RuneScape-Plain-12.ttf') format('truetype');
    font-weight: normal;
    font-display: swap;
}
@font-face {
    font-family: 'RS Bold';
    src: url('../fonts/RuneScape-Bold-12.ttf') format('truetype');
    font-weight: normal;
    font-display: swap;
}
@font-face {
    font-family: 'RS Quill';
    src: url('../fonts/RuneScape-Quill-8.ttf') format('truetype');
    font-weight: normal;
    font-display: swap;
}

*, *::before, *::after {
    margin: 0; padding: 0; box-sizing: border-box;
    user-select: none; -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --frame: #494034;
    --frame-hi: #6B5D4F;
    --frame-lo: #2A2118;
    --panel-bg: #3E3529;
    --dark-bg: #252017;
    --darkest: #1A1610;
    --gold: #FFD700;
    --gold-dim: #B8860B;
    --green: #00FF00;
    --red: #FF3333;
    --white: #F5F0E0;
    --muted: #9B8B6B;
    --chat-bg: #111A10;
    --cell-bg: #2b271f;
    --cell-hover: #3b3226;
    --cell-active: #4a4035;
}

html, body { height: 100%; overflow: hidden; }

body {
    background: #0E0C08;
    color: var(--white);
    font-family: -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
}

.gold { color: var(--gold); }

/* === ICONS (OSRS wiki sprites) === */
.icon {
    display: inline-block;
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    vertical-align: middle;
}
.icon-skill { width: 25px; height: 25px; }
.icon-method { width: 26px; height: 26px; }
.icon-action { width: 48px; height: 48px; }
.icon-bank { width: 30px; height: 30px; }
.icon-shop { width: 28px; height: 28px; }
.icon-lu { width: 56px; height: 56px; image-rendering: pixelated; }
.icon-tab { width: 20px; height: 20px; }
.icon-equip { width: 30px; height: 30px; }
.icon-sm { width: 20px; height: 20px; }
.icon-xs { width: 14px; height: 14px; }

/* =============================================
   GAME SHELL
   ============================================= */
.game {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    position: relative;
}

/* =============================================
   TOP BAR
   ============================================= */
.topbar {
    position: relative;
    background: linear-gradient(180deg, #5A4E40, #3E3529);
    border-bottom: 2px solid #000;
    box-shadow: inset 0 1px 0 var(--frame-hi);
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 48px;
    gap: 16px;
}

.topbar-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--gold);
    text-shadow: 1px 1px 0 #000, 0 0 10px rgba(255,215,0,0.3);
    letter-spacing: 1px;
    white-space: nowrap;
}

.topbar-alpha {
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    background: #c0392b;
    padding: 1px 4px;
    border-radius: 3px;
    vertical-align: top;
    letter-spacing: 0.5px;
    text-shadow: none;
    margin-left: 2px;
}

.topbar-roadmap {
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    gap: 4px;
}
.topbar-roadmap:hover { background: rgba(255,255,255,0.1); color: var(--white); }
.topbar-roadmap.has-update::after {
    content: '';
    width: 8px;
    height: 8px;
    background: #e03030;
    border-radius: 50%;
    animation: update-pulse 1.5s ease-in-out infinite;
}
@keyframes update-pulse { 0%,100% { opacity:1 } 50% { opacity:0.3 } }
.pause-btn {
    margin-left: auto;
    cursor: pointer;
    color: var(--muted);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.15s, color 0.15s;
}
.pause-btn:hover { background: rgba(255,255,255,0.1); color: var(--white); }
.pause-btn.paused { background: rgba(255,152,31,0.25); color: #FF981F; }
.pause-btn.paused:hover { background: rgba(255,152,31,0.4); }

.topbar-stats {
    display: flex;
    gap: 16px;
    margin-left: auto;
    font-size: 13px;
    color: var(--muted);
}

.stat-val {
    font-weight: 700;
    color: var(--white);
}

.topbar-coin-icon {
    width: 16px;
    height: 16px;
    image-rendering: pixelated;
    vertical-align: middle;
    margin-right: 2px;
}

/* =============================================
   GAME BODY — left column + sidebar
   ============================================= */
.game-body {
    flex: 1;
    display: flex;
    min-height: 0;
    gap: 0;
    background: #000;
}

.left-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* =============================================
   VIEWPORT (main game window)
   ============================================= */
.viewport {
    flex: 1;
    background: #1a1610;
    border: 2px solid #000;
    box-shadow: inset 0 0 80px rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    min-width: 0;
    padding: 16px;
}

.viewport.bg-dungeon {
    background: url('../img/background.png') center/cover no-repeat #1a1610;
}
.viewport.bg-castle {
    background: url('../img/castle.png') center/cover no-repeat #1a1610;
}
.viewport.bg-lava_castle {
    background: url('../img/lava_castle.png') center/cover no-repeat #1a1610;
}
.viewport.bg-valley {
    background: url('../img/valley.png') center/cover no-repeat #1a1610;
}
.viewport.bg-village {
    background: url('../img/village.png') center/cover no-repeat #1a1610;
}
.viewport.bg-forest_cave {
    background: url('../img/forest_cave.png') center/cover no-repeat #1a1610;
}
.viewport.bg-forest_waterfall {
    background: url('../img/forest_waterfall.png') center/cover no-repeat #1a1610;
}
.viewport.bg-harbor {
    background: url('../img/harbor.png') center/cover no-repeat #1a1610;
}
.viewport.bg-fishing {
    background: url('../img/fishing.png') center/cover no-repeat #1a1610;
}
.viewport.bg-smithy {
    background: url('../img/smithy.png') center/cover no-repeat #1a1610;
}
.viewport.bg-marketplace {
    background: url('../img/marketplace.png') center/cover no-repeat #1a1610;
}
.viewport.bg-crystal_gate {
    background: url('../img/crystal_gate.png') center/cover no-repeat #1a1610;
}
.viewport.bg-theatre {
    background: url('../img/theatre.png') center/cover no-repeat #0a0202;
}

.vp-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: auto 0;
}

.action-status {
    position: absolute;
    top: 10px;
    left: 12px;
    font-size: 12px;
    font-weight: 700;
    text-shadow: 1px 1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000;
    letter-spacing: 0.5px;
}

.action-status.idle { color: var(--muted); }

.action-status.training {
    color: var(--green);
    animation: pulse 2.5s infinite;
}

@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.6; } }

.action-icon-wrap {
    position: relative;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,215,0,0.04) 0%, transparent 70%),
                rgba(30, 25, 20, 0.15);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border: 3px solid var(--frame);
    box-shadow: 0 0 20px rgba(0,0,0,0.5), inset 0 0 50px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    cursor: pointer;
    transition: transform 0.08s;
}

.action-icon-wrap:active {
    transform: scale(0.93);
    border-color: var(--gold);
    box-shadow: 0 0 25px rgba(255,215,0,0.15), inset 0 0 15px rgba(0,0,0,0.4);
}
.action-icon-wrap.clog-complete {
    border-color: #00ff00;
    box-shadow: 0 0 15px rgba(255,215,0,0.4), 0 0 30px rgba(255,215,0,0.2), inset 0 0 50px rgba(0,0,0,0.5);
}
.action-icon-wrap.hit-flash {
    animation: hitFlash 0.15s ease-out;
}
@keyframes hitFlash {
    0% { filter: brightness(1.6); transform: scale(0.94); }
    40% { filter: brightness(1.2); transform: scale(1.03); }
    100% { filter: brightness(1); transform: scale(1); }
}

.action-icon { font-size: 40px; }
.action-icon .icon-action { width: 128px; height: 128px; }
.action-icon.monster .icon-action { width: 200px; height: 200px; }

.partyhat-overlay {
    position: absolute;
    top: -28px;
    left: 23%;
    transform: translateX(-60%) rotate(-28deg);
    width: 72px;
    height: 72px;
    image-rendering: pixelated;
    z-index: 10;
    cursor: pointer;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6))
           drop-shadow(0 0 8px rgba(85, 205, 252, 0.4));
    animation: partyhatShimmer 3s ease-in-out infinite;
}
@keyframes partyhatShimmer {
    0%, 100% { filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6)) drop-shadow(0 0 8px rgba(85, 205, 252, 0.35)); }
    50% { filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6)) drop-shadow(0 0 14px rgba(85, 205, 252, 0.7)); }
}
@keyframes partyhat-glow {
    0%, 100% { text-shadow: 0 0 20px rgba(255,215,0,0.8), 0 0 40px rgba(255,215,0,0.4); }
    50% { text-shadow: 0 0 30px rgba(255,215,0,1), 0 0 60px rgba(255,215,0,0.6), 0 0 80px rgba(255,215,0,0.3); }
}

.action-progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 3px;
    background: rgba(0,0,0,0.3);
    overflow: hidden;
    z-index: 10;
}

.action-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00AA00, #55DD55);
    transition: width 0.1s linear;
    box-shadow: 0 0 4px rgba(0,255,0,0.3);
}

.action-info { text-align: center; }

.action-skill-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--gold);
    text-shadow: 1px 1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000;
}

.action-method-name {
    font-size: 14px;
    color: var(--white);
    margin-top: 2px;
    text-shadow: 1px 1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000;
}

.action-xp {
    font-size: 13px;
    color: var(--green);
    margin-top: 4px;
    text-shadow: 1px 1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000;
}

.action-cost {
    font-size: 12px;
    margin-top: 4px;
    text-shadow: 1px 1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000;
}

.res-ok { color: var(--green); }
.res-no { color: var(--red); }

.weapon-display {
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
    text-shadow: 1px 1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000;
    position: relative;
}
.weapon-display img {
    width: 16px;
    height: 16px;
    image-rendering: pixelated;
    vertical-align: middle;
}
.weapon-display .weapon-name {
    vertical-align: middle;
}
.weapon-ammo-row {
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: default;
}
.weapon-ammo-row img {
    width: 14px;
    height: 14px;
}
.weapon-ammo-timer {
    font-size: 10px;
    color: #cc8800;
    text-shadow: 1px 1px 0 #000;
    white-space: nowrap;
    line-height: 1;
}
.weapon-ammo-tip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #3b3024;
    border: 1px solid #5a4a3a;
    border-radius: 4px;
    padding: 6px 10px;
    z-index: 100;
    white-space: nowrap;
    font-size: 11px;
    color: var(--muted);
    text-shadow: 1px 1px 0 #000;
    pointer-events: none;
}
.weapon-ammo-tip-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}
.weapon-ammo-tip-row img {
    width: 14px;
    height: 14px;
    image-rendering: pixelated;
}
.weapon-ammo-tip-row .tip-qty {
    color: #cc8800;
    margin-left: auto;
}
.weapon-ammo-tip-row .tip-rate {
    color: var(--green);
    font-size: 10px;
}

/* XP bar */
.xp-bar-wrap {
    width: 100%;
    max-width: 300px;
    margin-top: 4px;
}

.xp-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 3px;
}

.xp-bar {
    height: 10px;
    background: #111;
    border: 2px solid var(--frame-lo);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.8), 0 1px 0 var(--frame-hi);
    overflow: hidden;
}

.xp-bar-fill {
    height: 100%;
    background: linear-gradient(180deg, #55DD55, #00AA00, #008800);
    transition: width 0.3s;
}

/* Viewport orb buttons — bottom-right (shops + settings) */
.shop-orbs {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.shop-orb {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: var(--cell-bg);
    /* Stone pillar border (radial version of sidebar gradient) */
    border: 4px solid #494034;
    border-top-color: #6B5D4F;
    border-left-color: #5A4E40;
    border-right-color: #3E3529;
    border-bottom-color: #2A2118;
    box-shadow:
        0 0 0 1px #000,
        inset 0 0 6px rgba(0,0,0,0.5),
        0 2px 6px rgba(0,0,0,0.6);
    opacity: 0.85;
    transition: opacity 0.15s;
}
.shop-orb:hover { opacity: 1; }
.shop-orb img {
    width: 28px;
    height: 28px;
    image-rendering: pixelated;
    filter: drop-shadow(1px 1px 0 rgba(0,0,0,0.6));
}


/* OSRS-style settings overlay */
.settings-overlay {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.35);
}

/* Stone frame panel — matches OSRS settings panel */
.settings-panel {
    /* Outer stone frame */
    background: #5d5549;
    background-image:
        linear-gradient(180deg, #706358 0%, #5d5549 8%, #524940 92%, #3d3630 100%);
    border: 2px solid #000;
    box-shadow:
        inset 1px 1px 0 #8B7D6B,
        inset -1px -1px 0 #2A2420,
        0 6px 24px rgba(0,0,0,0.7);
    padding: 5px;
    min-width: 270px;
    max-width: 420px;
    width: 90%;
}
/* Inner dark inset area */
.settings-inner {
    background: #3a342c;
    background-image:
        linear-gradient(180deg, #332e27 0%, #3a342c 15%, #3a342c 85%, #2e2922 100%);
    border: 1px solid #1a1610;
    box-shadow:
        inset 0 1px 3px rgba(0,0,0,0.4),
        0 1px 0 #6B6256;
}

/* Panel header — inside inner area */
.settings-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 8px 10px 6px;
}
.settings-title {
    font-family: 'RS Bold', 'RS Plain', serif;
    font-size: 18px;
    color: #FF981F;
    text-shadow: 1px 1px 0 #000;
    letter-spacing: 0.5px;
}
.settings-close {
    position: absolute;
    right: 4px;
    top: 4px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #FF981F;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    text-shadow: 1px 1px 0 #000;
    opacity: 0.7;
}
.settings-close:hover {
    opacity: 1;
    color: #FF0000;
}

/* Panel body */
.settings-body {
    padding: 4px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Settings row — icon + control */
.settings-row {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 28px;
}
.settings-row-icon {
    width: 22px;
    height: 22px;
    image-rendering: pixelated;
    flex-shrink: 0;
}
.settings-vol-icon { cursor: pointer; }
.settings-vol-icon:hover { filter: brightness(1.3); }
.settings-vol-icon.muted { opacity: 0.4; filter: grayscale(1); }
.settings-vol-icon.muted:hover { opacity: 0.7; }
.settings-row-label {
    font-family: 'RS Plain', serif;
    font-size: 15px;
    color: #FF981F;
    text-shadow: 1px 1px 0 #000;
    flex-shrink: 0;
    min-width: 65px;
}

/* Discord icons & join button */
svg.discord-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}
.topbar-discord {
    display: flex;
    align-items: center;
    margin: 0 8px;
    flex-shrink: 0;
}
.topbar-discord svg {
    width: 24px;
    height: 24px;
    fill: #5865F2;
    transition: fill 0.15s;
}
.topbar-discord:hover svg { fill: #fff; }
.settings-discord-btn {
    margin-left: auto;
    background: #5865F2;
    color: #fff;
    font-family: 'RS Bold', serif;
    font-size: 13px;
    padding: 3px 12px;
    border-radius: 3px;
    text-decoration: none;
    border: 1px solid #4752c4;
}
.settings-discord-btn:hover { background: #4752c4; }

/* Broadcast name input */
.settings-broadcast-name {
    background: #1a1a1a;
    border: 1px solid #555;
    color: #c9a86c;
    font-family: 'RS Plain', serif;
    font-size: 14px;
    padding: 2px 6px;
    border-radius: 3px;
    width: 120px;
    margin-left: auto;
}
.settings-broadcast-name::placeholder { color: #666; }
.settings-broadcast-name:focus { outline: none; border-color: #FF981F; }

/* Eat threshold slider */
.settings-eat-value {
    font-family: 'RS Plain', serif;
    font-size: 14px;
    color: #c9a86c;
    text-shadow: 1px 1px 0 #000;
    min-width: 30px;
    text-align: right;
}
.settings-eat-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 8px;
    background: #3a3226;
    border: 1px solid #000;
    border-radius: 0;
    outline: none;
    cursor: pointer;
}
.settings-eat-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 16px;
    background: linear-gradient(180deg, #7B6D5F, #494034);
    border: 1px solid #000;
    cursor: pointer;
}
.settings-eat-slider::-moz-range-thumb {
    width: 10px;
    height: 16px;
    background: linear-gradient(180deg, #7B6D5F, #494034);
    border: 1px solid #000;
    border-radius: 0;
    cursor: pointer;
}

/* Background picker grid */
.bg-picker-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 6px 0 4px 0;
}
.bg-picker-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: #252019;
    border: 2px solid #3a3226;
    border-radius: 4px;
    padding: 3px;
    cursor: pointer;
    color: #b0a48a;
    font-family: 'RS Plain', serif;
    font-size: 11px;
    text-shadow: 1px 1px 0 #000;
    transition: border-color 0.15s;
}
.bg-picker-btn:hover {
    border-color: #5a4f3e;
}
.bg-picker-btn.active {
    border-color: #FF981F;
    color: #FF981F;
}
.bg-picker-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 2px;
    image-rendering: auto;
}
.bg-picker-none {
    width: 100%;
    aspect-ratio: 16/9;
    background: #1a1610;
    border-radius: 2px;
    border: 1px solid #3a3226;
}

/* Settings background row */
.settings-row-bg {
    gap: 8px;
}
.settings-bg-current {
    color: #b0a48a;
    font-size: 12px;
    text-shadow: 1px 1px 0 #000;
    margin-left: auto;
}
.settings-bg-browse {
    background: #3a342c;
    border: 1px solid #5a4f3e;
    border-radius: 3px;
    color: #FF981F;
    font-family: 'RS Plain', serif;
    font-size: 12px;
    padding: 2px 10px;
    cursor: pointer;
    text-shadow: 1px 1px 0 #000;
    transition: border-color 0.15s, background 0.15s;
}
.settings-bg-browse:hover {
    border-color: #FF981F;
    background: #4a4235;
}

/* Background browser modal */
.bg-browser-overlay {
    position: absolute;
    inset: 0;
    z-index: 55;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.55);
}
.bg-browser-panel {
    background: #5d5549;
    background-image:
        linear-gradient(180deg, #706358 0%, #5d5549 8%, #524940 92%, #3d3630 100%);
    border: 2px solid #000;
    box-shadow:
        inset 1px 1px 0 #8B7D6B,
        inset -1px -1px 0 #2A2420,
        0 6px 24px rgba(0,0,0,0.7);
    padding: 6px;
    width: 580px;
    max-width: 95%;
    max-height: 85%;
}
.bg-browser-inner {
    background: #3a342c;
    background-image:
        linear-gradient(180deg, #332e27 0%, #3a342c 15%, #3a342c 85%, #2e2922 100%);
    border: 1px solid #1a1610;
    box-shadow:
        inset 0 1px 3px rgba(0,0,0,0.4),
        0 1px 0 #6B6256;
    display: flex;
    flex-direction: column;
    max-height: calc(85vh - 14px);
    overflow-y: auto;
}
.bg-browser-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 8px 10px 6px;
    border-bottom: 1px solid #1a1610;
}
.bg-browser-title {
    font-family: 'RS Bold', 'RS Plain', serif;
    font-size: 18px;
    color: #FF981F;
    text-shadow: 1px 1px 0 #000;
}
.bg-browser-close {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #ff6666;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    opacity: 0.8;
    transition: opacity 0.15s;
}
.bg-browser-close:hover { opacity: 1; }
.bg-browser-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 10px;
}
.bg-browser-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: #252019;
    border: 2px solid #3a3226;
    border-radius: 4px;
    padding: 4px;
    cursor: pointer;
    color: #b0a48a;
    font-family: 'RS Plain', serif;
    font-size: 12px;
    text-shadow: 1px 1px 0 #000;
    transition: border-color 0.15s, transform 0.1s;
}
.bg-browser-btn:hover {
    border-color: #5a4f3e;
    transform: scale(1.02);
}
.bg-browser-btn.active {
    border-color: #FF981F;
    color: #FF981F;
    box-shadow: 0 0 8px rgba(255,152,31,0.25);
}
.bg-browser-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 2px;
    image-rendering: auto;
}
.bg-browser-none {
    width: 100%;
    aspect-ratio: 16/9;
    background: #1a1610;
    border-radius: 2px;
    border: 1px solid #3a3226;
}
@media (max-width: 500px) {
    .bg-browser-grid { grid-template-columns: repeat(2, 1fr); }
    .bg-browser-overlay { position: fixed; }
}

/* Shop modal — OSRS-style centered shop window */
.shop-modal-overlay {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
}
.shop-modal-panel {
    background: #5d5549;
    background-image:
        linear-gradient(180deg, #706358 0%, #5d5549 8%, #524940 92%, #3d3630 100%);
    border: 2px solid #000;
    box-shadow:
        inset 1px 1px 0 #8B7D6B,
        inset -1px -1px 0 #2A2420,
        0 6px 24px rgba(0,0,0,0.7);
    padding: 6px;
    width: 740px;
    max-width: 95%;
    max-height: 90%;
}
.shop-modal-inner {
    background: #3a342c;
    background-image:
        linear-gradient(180deg, #332e27 0%, #3a342c 15%, #3a342c 85%, #2e2922 100%);
    border: 1px solid #1a1610;
    box-shadow:
        inset 0 1px 3px rgba(0,0,0,0.4),
        0 1px 0 #6B6256;
    display: flex;
    flex-direction: column;
    max-height: calc(90% - 14px);
}
.shop-modal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 8px 10px 6px;
    border-bottom: 1px solid #1a1610;
}
.shop-modal-title {
    font-family: 'RS Bold', 'RS Plain', serif;
    font-size: 18px;
    color: #FF981F;
    text-shadow: 1px 1px 0 #000;
}
.shop-modal-gold {
    position: absolute;
    left: 10px;
    font-size: 12px;
    color: var(--gold);
    text-shadow: 1px 1px 0 #000;
}
.shop-modal-close {
    position: absolute;
    right: 6px;
    top: 4px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--red);
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
}
.shop-modal-close:hover { color: #ff6666; }
/* Gauntlet style picker buttons */
.gauntlet-style-btn {
    background: #3a342c;
    border: 1px solid #5d5549;
    border-radius: 4px;
    padding: 10px 14px;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s;
}
.gauntlet-style-btn:hover {
    background: #4a4238;
    border-color: #8B7D6B;
}
.shop-modal-body {
    overflow-y: auto;
}
/* Widen the grid inside shop modal for more items per row */
.shop-modal-body .bank-grid {
    grid-template-columns: repeat(5, 1fr);
}
/* Armoury: 7 columns (one per metal tier), items flow down each column */
.shop-modal-body .armoury-grid {
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(10, auto);
    grid-auto-flow: column;
}

/* Combat shop tabs */
.combat-shop-tabs {
    display: flex;
    gap: 2px;
    padding: 4px 4px 0;
    background: #2A2118;
    border-bottom: 2px solid #000;
    margin-bottom: 4px;
}
.combat-shop-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 8px;
    background: linear-gradient(180deg, #584C3E, #3E3529, #2A2118);
    border: 1px solid #000;
    border-bottom: none;
    border-radius: 3px 3px 0 0;
    cursor: pointer;
    color: #c8b89a;
    font-family: 'RS Plain', serif;
    font-size: 13px;
    text-shadow: 1px 1px 0 #000;
}
.combat-shop-tab:hover {
    background: linear-gradient(180deg, #6B5D4F, #4A4035, #3E3529);
}
.combat-shop-tab.active {
    background: linear-gradient(180deg, #6B5D4F, #5A4E40, #494034);
    border-color: #494034;
    color: #FF981F;
}
.combat-shop-tab img {
    width: 20px;
    height: 20px;
    image-rendering: pixelated;
}

/* MTA Rewards Guardian balance bar */
.mta-balance-bar {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 6px 8px;
    margin-bottom: 8px;
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
    font-size: 12px;
    color: #FF981F;
}
.mta-balance {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* OSRS segmented slider — circular dots like real OSRS */
.osrs-slider {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    cursor: pointer;
    padding: 2px 0;
    height: 20px;
}
.osrs-slider-seg {
    width: 7px;
    height: 12px;
    flex-shrink: 0;
    border-radius: 2px;
    background: #252019;
    border: 1px solid #1a1610;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.6);
}
.osrs-slider-seg.filled {
    background: linear-gradient(180deg, #6ABF3A 0%, #4AA528 30%, #3B9420 60%, #2D7A18 100%);
    border-color: #1D5A10;
    box-shadow:
        inset 0 1px 0 rgba(180,255,120,0.3),
        inset 0 -1px 0 rgba(0,0,0,0.25);
}
.osrs-slider-seg:hover {
    box-shadow: 0 0 3px rgba(255,152,31,0.5);
}

/* OSRS-style checkbox toggle — green tick on dark bg */
.osrs-checkbox {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    background: #252019;
    border: 1px solid #1a1610;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: auto;
}
.osrs-checkbox .checkmark {
    display: none;
    color: #3EBF2D;
    font-size: 14px;
    font-weight: 900;
    text-shadow: 0 0 1px rgba(62,191,45,0.5);
    line-height: 1;
}
.osrs-checkbox.checked .checkmark {
    display: block;
}

/* Divider line */
.settings-divider {
    height: 1px;
    background: #1a1610;
    box-shadow: 0 1px 0 rgba(107,98,86,0.3);
    margin: 2px 0;
}

/* Milestone notification button — left side */
.milestone-notif {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 8px;
    z-index: 15;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 35% 35%, #5c5141, #3b3024 70%);
    border: 2px solid #5c5141;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.08),
        inset 0 0 6px rgba(0,0,0,0.5),
        0 2px 6px rgba(0,0,0,0.6);
    cursor: pointer;
    opacity: 0.9;
    transition: opacity 0.15s;
}
.milestone-notif:hover { opacity: 1; }
.milestone-notif img {
    width: 28px;
    height: 28px;
    image-rendering: pixelated;
    filter: drop-shadow(1px 1px 0 rgba(0,0,0,0.6));
}
.milestone-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: #e03030;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
    line-height: 1;
}

/* Milestone panel — anchored left side */
.milestone-panel {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 64px;
    z-index: 60;
    background: #3b3024;
    border: 2px solid #5c5141;
    border-radius: 4px;
    padding: 12px;
    width: 320px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
}
.milestone-header {
    color: #FF981F;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 2px;
}
.milestone-sub {
    color: #b0a48a;
    font-size: 11px;
    margin-bottom: 10px;
}
.milestone-cards {
    display: flex;
    gap: 6px;
    justify-content: center;
}
.milestone-card {
    flex: 1;
    background: #2a2118;
    border: 2px solid #5c5141;
    border-radius: 4px;
    padding: 8px 4px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.milestone-card:hover {
    border-color: #FF981F;
    background: #3b3024;
}
.milestone-card-icon {
    width: 28px;
    height: 28px;
    image-rendering: pixelated;
    margin-bottom: 6px;
}
.milestone-card-title {
    color: #FF981F;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 4px;
}
.milestone-card-bonus {
    color: #7ecf7e;
    font-size: 11px;
    margin-bottom: 2px;
}
.milestone-card-bonus2 {
    color: #8ab8e6;
    font-size: 11px;
}
.milestone-stats-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
    background: #2a2118;
    border: 1px solid #5c5141;
    border-radius: 4px;
    padding: 8px 12px;
}
.milestone-stat-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.milestone-stat-icon {
    width: 18px;
    height: 18px;
    image-rendering: pixelated;
}
.milestone-stat-label {
    color: #e0c8a8;
    font-size: 12px;
    flex: 1;
}
.milestone-stat-val {
    color: #7ecf7e;
    font-size: 12px;
    font-weight: bold;
}
.milestone-stat-val2 {
    color: #8ab8e6;
    font-size: 11px;
    margin-left: 4px;
}

/* Milestone XP progress bar — bottom of viewport */
.milestone-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 3px;
    background: rgba(0,0,0,0.3);
    overflow: hidden;
    z-index: 10;
}
.milestone-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4488cc, #66bbee);
    transition: width 0.3s linear;
    box-shadow: 0 0 4px rgba(100,180,255,0.3);
}

/* Settings milestone info */
.settings-milestone-info {
    padding: 6px 8px;
    text-align: center;
}
.milestone-stats {
    display: flex;
    justify-content: center;
    gap: 12px;
    color: #7ecf7e;
    font-size: 11px;
}
.milestone-respec-btn {
    display: block;
    margin: 6px auto 2px;
    padding: 4px 12px;
    background: #5c1a1a;
    color: #e0c8a8;
    border: 1px solid #8b4513;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
}
.milestone-respec-btn:hover {
    background: #7a2020;
}

/* =============================================
   CHARACTER SELECT OVERLAY
   ============================================= */
.charselect-overlay {
    position: absolute;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
}
.charselect-panel {
    background: #5d5549;
    background-image: linear-gradient(180deg, #706358 0%, #5d5549 8%, #524940 92%, #3d3630 100%);
    border: 2px solid #000;
    box-shadow: inset 1px 1px 0 #8B7D6B, inset -1px -1px 0 #2A2420, 0 6px 24px rgba(0,0,0,0.7);
    padding: 6px;
    width: 420px;
    max-width: 95%;
}
.charselect-inner {
    background: #3a342c;
    background-image: linear-gradient(180deg, #332e27 0%, #3a342c 15%, #3a342c 85%, #2e2922 100%);
    border: 1px solid #1a1610;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.4), 0 1px 0 #6B6256;
}
.charselect-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 10px 10px 8px;
    border-bottom: 1px solid #1a1610;
}
.charselect-title {
    font-family: 'RS Bold', 'RS Plain', serif;
    font-size: 18px;
    color: #FF981F;
    text-shadow: 1px 1px 0 #000;
}
.charselect-close {
    position: absolute;
    right: 6px;
    top: 6px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff3333;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
}
.charselect-close:hover { color: #ff6666; }
.charselect-body {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 70vh;
    overflow-y: auto;
}
.charslot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #252017;
    border: 2px solid #3a3226;
    border-radius: 3px;
    padding: 8px 10px;
    min-height: 48px;
}
.charslot:hover { border-color: #5a4f3e; }
.charslot-active { border-color: #FF981F; background: #2e2820; }
.charslot-info { flex: 1; min-width: 0; }
.charslot-name {
    font-family: 'RS Bold', 'RS Plain', serif;
    font-size: 15px;
    color: #fff;
    text-shadow: 1px 1px 0 #000;
    margin-bottom: 2px;
}
.charslot-name.charslot-empty { color: #b0a48a; font-family: 'RS Plain', serif; }
.charslot-playing { font-size: 11px; color: #0f0; }
.charslot-stats { font-size: 12px; color: #b0a48a; }
.charslot-stats .stat-val { color: #fff; }
.charslot-actions { display: flex; gap: 6px; flex-shrink: 0; }
.charslot-btn {
    font-family: 'RS Plain', serif;
    font-size: 13px;
    padding: 4px 12px;
    border: 1px solid #000;
    border-radius: 2px;
    cursor: pointer;
    text-shadow: 1px 1px 0 #000;
}
.charslot-load, .charslot-create, .charslot-confirm {
    background: linear-gradient(180deg, #6ABF3A 0%, #3B9420 60%, #2D7A18 100%);
    color: #fff;
    border-color: #1D5A10;
}
.charslot-load:hover, .charslot-create:hover, .charslot-confirm:hover {
    background: linear-gradient(180deg, #7ED34E 0%, #4AA528 60%, #3B9420 100%);
}
.charslot-delete {
    background: linear-gradient(180deg, #c0392b 0%, #962d22 60%, #751f16 100%);
    color: #fff;
    border-color: #4a1410;
}
.charslot-delete:hover {
    background: linear-gradient(180deg, #e74c3c 0%, #c0392b 60%, #962d22 100%);
}
.charslot-cancel {
    background: linear-gradient(180deg, #5a4e40 0%, #3E3529 60%, #2A2118 100%);
    color: #b0a48a;
    border-color: #1a1610;
}
.charslot-cancel:hover { color: #fff; }
.charslot-export {
    background: linear-gradient(180deg, #5a4e40 0%, #3E3529 60%, #2A2118 100%);
    color: #b0a48a;
    border-color: #1a1610;
}
.charslot-export:hover { color: #fff; }
.charslot-import {
    background: linear-gradient(180deg, #3a6abf 0%, #204a94 60%, #183a7a 100%);
    color: #fff;
    border-color: #102a5a;
    width: 100%;
    margin-top: 8px;
    padding: 8px 12px;
    font-size: 14px;
}
.charslot-import:hover {
    background: linear-gradient(180deg, #4e7ed3 0%, #2a5aa5 60%, #204a94 100%);
}
.charslot-create-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px 8px;
}
.charslot-create-title {
    font-family: 'RS Bold', 'RS Plain', serif;
    font-size: 16px;
    color: #FF981F;
    text-shadow: 1px 1px 0 #000;
}
.charslot-create-row { display: flex; align-items: center; gap: 8px; }
.charslot-create-label {
    font-family: 'RS Plain', serif;
    font-size: 15px;
    color: #FF981F;
    text-shadow: 1px 1px 0 #000;
}
.charslot-name-input {
    font-family: 'RS Plain', serif;
    font-size: 15px;
    background: #1a1610;
    border: 2px solid #3a3226;
    color: #fff;
    padding: 4px 8px;
    width: 180px;
    outline: none;
}
.charslot-name-input:focus { border-color: #FF981F; }
.charslot-create-buttons { display: flex; gap: 10px; }
.charslot-delete-warn {
    font-family: 'RS Plain', serif;
    font-size: 14px;
    color: #fff;
    text-shadow: 1px 1px 0 #000;
    text-align: center;
    line-height: 1.6;
}

/* Cloud saves */
.cloud-section {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #3a3226;
}
.cloud-section-top {
    margin-top: 0;
    margin-bottom: 8px;
    padding-top: 0;
    padding-bottom: 8px;
    border-top: none;
    border-bottom: 1px solid #3a3226;
}
.cloud-signed-in {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
}
.cloud-user-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.cloud-icon {
    width: 16px;
    height: 16px;
    color: #6B6256;
    flex-shrink: 0;
}
.cloud-icon-active {
    color: #4da6ff;
}
.cloud-user-email {
    font-family: 'RS Plain', serif;
    font-size: 12px;
    color: #b0a48a;
    text-shadow: 1px 1px 0 #000;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}
.cloud-signout-btn {
    font-size: 11px !important;
    padding: 2px 8px !important;
    background: linear-gradient(180deg, #5a4e40 0%, #3E3529 60%, #2A2118 100%) !important;
    color: #b0a48a !important;
    border-color: #1a1610 !important;
}
.cloud-signout-btn:hover { color: #fff !important; }
.cloud-signed-out {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.cloud-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    font-family: 'RS Plain', serif;
    font-size: 14px;
    color: #fff;
    text-shadow: 1px 1px 0 #000;
    background: linear-gradient(180deg, #4a7ec7 0%, #2d5a9e 60%, #1e4280 100%);
    border: 1px solid #15305a;
    border-radius: 2px;
    cursor: pointer;
}
.cloud-google-btn:hover {
    background: linear-gradient(180deg, #5a8ed7 0%, #3d6aae 60%, #2d5a9e 100%);
}
.cloud-google-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.cloud-hint {
    font-family: 'RS Plain', serif;
    font-size: 11px;
    color: #6B6256;
    text-shadow: 1px 1px 0 #000;
}

/* Login screen */
.login-screen-body {
    align-items: center;
    padding: 20px 16px;
    gap: 12px;
}
.login-welcome {
    font-family: 'RS Bold', 'RS Plain', serif;
    font-size: 16px;
    color: #FF981F;
    text-shadow: 1px 1px 0 #000;
    margin-bottom: 4px;
}
.login-google-btn {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
}
.login-separator {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}
.login-separator-line {
    flex: 1;
    height: 1px;
    background: #3a3226;
}
.login-separator-text {
    font-family: 'RS Plain', serif;
    font-size: 12px;
    color: #6B6256;
    text-shadow: 1px 1px 0 #000;
}
.login-guest-btn {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    background: linear-gradient(180deg, #5a4e40 0%, #3E3529 60%, #2A2118 100%) !important;
    color: #b0a48a !important;
    border-color: #1a1610 !important;
}
.login-guest-btn:hover { color: #fff !important; }
.login-hint {
    font-family: 'RS Plain', serif;
    font-size: 11px;
    color: #6B6256;
    text-shadow: 1px 1px 0 #000;
}

.topbar-char-btn {
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 3px;
    transition: background 0.15s;
    font-size: 13px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.topbar-char-btn:hover { background: rgba(255, 255, 255, 0.1); }
.topbar-char-icon { width: 16px; height: 16px; flex-shrink: 0; }

/* Monster info button — inline next to HP bar */
.monster-info-btn-wrap {
    flex-shrink: 0;
}
.monster-info-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #494034;
    border: 2px solid #000;
    border-top-color: #7B6D5F;
    border-left-color: #6B5D4F;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.15s;
}
.monster-info-btn:hover { opacity: 1; }
.monster-info-btn img {
    width: 16px;
    height: 16px;
    image-rendering: pixelated;
}


/* Monster info panel — left-aligned in viewport */
.monster-info-panel-left {
    position: absolute;
    left: 8px;
    top: 40px;
    max-width: 340px;
    min-width: 280px;
    z-index: 50;
    background: linear-gradient(180deg, #5d5549 0%, #4a4136 100%);
    border: 2px solid #000;
    border-top-color: #7B6D5F;
    border-left-color: #6B5D4F;
    box-shadow: 2px 3px 8px rgba(0,0,0,0.6);
}
.monster-info-panel-left .settings-inner {
    background: none;
    border: none;
    box-shadow: none;
}
.monster-info-pin {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    filter: brightness(2) saturate(0.3);
    transition: filter 0.15s, transform 0.15s;
}
.monster-info-pin:hover { filter: brightness(1.5) saturate(0.6); }
.monster-info-pin.pinned {
    filter: none;
    transform: translateY(-50%) rotate(45deg);
}
.monster-info-body {
    padding: 6px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Monster icon row */
.monster-info-icon-row {
    display: flex;
    justify-content: center;
    padding: 4px 0 2px;
}
.monster-info-icon {
    width: 48px;
    height: 48px;
    image-rendering: pixelated;
}

/* Monster stat sections (OSRS wiki-style) */
.mi-section {
    margin-top: 4px;
    padding: 4px 6px;
    background: rgba(0,0,0,0.2);
    border: 1px solid #1a1610;
    border-radius: 2px;
}
.mi-section-title {
    font-family: 'RS Bold', 'RS Plain', serif;
    font-size: 12px;
    color: #FF981F;
    text-shadow: 1px 1px 0 #000;
    text-align: center;
    margin-bottom: 4px;
}
.mi-stat-row {
    display: flex;
    justify-content: space-evenly;
    align-items: flex-start;
    gap: 2px;
}
.mi-stat-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    min-width: 32px;
}
.mi-stat-cell img {
    width: 18px;
    height: 18px;
    image-rendering: pixelated;
}
.mi-cell-val {
    font-family: 'RS Bold', 'RS Plain', serif;
    font-size: 12px;
    color: #fff;
    text-shadow: 1px 1px 0 #000;
    white-space: nowrap;
}
.mi-attack-style .mi-stat-cell {
    flex-direction: row;
    gap: 4px;
}
.mi-cell-label {
    font-family: 'RS Plain', serif;
    font-size: 10px;
    color: #c0b8a8;
    text-shadow: 1px 1px 0 #000;
}
/* Magic defence row — align items side-by-side */
.mi-magic-def-row {
    justify-content: center;
    gap: 16px;
}
/* Elemental weakness styling */
.mi-weakness {
    flex-direction: row;
    gap: 4px;
}
.mi-weakness-val {
    color: #7cc576;
    font-size: 11px;
}

/* Loot table section */
.mi-loot-title {
    font-family: 'RS Bold', 'RS Plain', serif;
    font-size: 14px;
    color: #FF981F;
    text-shadow: 1px 1px 0 #000;
    text-align: center;
    padding: 6px 0 4px;
    border-top: 1px solid #1a1610;
    box-shadow: 0 -1px 0 rgba(107,98,86,0.3);
}
.mi-loot-grid {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.mi-loot-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 4px;
    background: rgba(0,0,0,0.15);
    border: 1px solid transparent;
}
.mi-loot-row:nth-child(odd) {
    background: rgba(0,0,0,0.25);
}
.mi-loot-row.mi-loot-unique {
    border-color: rgba(255,152,31,0.25);
}
.mi-loot-icon {
    width: 20px;
    height: 20px;
    image-rendering: pixelated;
    flex-shrink: 0;
}
.mi-loot-name {
    flex: 1;
    font-family: 'RS Plain', serif;
    font-size: 13px;
    color: #c0b8a8;
    text-shadow: 1px 1px 0 #000;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mi-loot-unique .mi-loot-name {
    color: #FF981F;
}
.mi-loot-qty {
    font-family: 'RS Plain', serif;
    font-size: 12px;
    color: #aaa;
    text-shadow: 1px 1px 0 #000;
    min-width: 30px;
    text-align: right;
}
.mi-loot-pct {
    font-family: 'RS Plain', serif;
    font-size: 12px;
    color: #7cc576;
    text-shadow: 1px 1px 0 #000;
    min-width: 42px;
    text-align: right;
}
.mi-loot-unique .mi-loot-pct {
    color: #ffcc33;
}
.mi-loot-row.mi-loot-always {
    border-color: rgba(124,197,118,0.25);
}
.mi-loot-always .mi-loot-pct {
    color: #7cc576;
    font-weight: bold;
}
.mi-loot-row.mi-loot-pet {
    border-color: rgba(170,120,255,0.25);
}
.mi-loot-pet .mi-loot-name {
    color: #c8a0ff;
}
.mi-loot-pet .mi-loot-pct {
    color: #c8a0ff;
}
.mi-loot-row.mi-loot-subtable {
    border-color: rgba(100,180,255,0.2);
}
.mi-loot-subtable .mi-loot-name {
    color: #88bbee;
    font-style: italic;
}
.mi-loot-subtable .mi-loot-pct {
    color: #88bbee;
}

/* =============================================
   RIGHT SIDEBAR (OSRS-style with stone pillars)
   ============================================= */
.sidebar {
    width: 410px;
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    background: var(--panel-bg);
    border: 1px solid #000;
}

/* Stone pillar left */
.sidebar::before,
.sidebar::after {
    content: '';
    width: 7px;
    flex-shrink: 0;
    background:
        linear-gradient(90deg,
            #2A2118 0px,
            #5A4E40 1px,
            #6B5D4F 2px,
            #5A4E40 4px,
            #494034 5px,
            #3E3529 6px,
            #2A2118 7px
        );
    box-shadow: inset 0 0 4px rgba(0,0,0,0.5);
}

.sidebar-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.sidebar-upper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

.sidebar-splitter {
    height: 6px;
    cursor: row-resize;
    background: #1a1610;
    flex-shrink: 0;
    position: relative;
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}
.sidebar-splitter::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 2px;
    background: #5a5040;
    border-radius: 1px;
}
.sidebar-splitter:hover::after,
.sidebar-splitter:active::after {
    background: #8a7a60;
}

.sidebar-skills {
    flex: 0 1 auto;
    border-top: 2px solid #000;
    overflow-y: auto;
    margin-top: auto;
}

/* Sidebar tab bar (OSRS stone tabs) */
/* Top tabs (shops) */
.sidebar-top-tabs {
    display: flex;
    height: 46px;
    background: #2A2118;
    border-bottom: 2px solid #000;
    flex-shrink: 0;
    gap: 1px;
    padding: 2px 2px 0;
}
.sidebar-top-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #584C3E, #3E3529, #2A2118);
    border: 1px solid #000;
    border-bottom: none;
    border-radius: 3px 3px 0 0;
    cursor: pointer;
    transition: background 0.1s;
    padding: 0;
    font-family: inherit;
    position: relative;
}
.sidebar-top-tab:hover { background: linear-gradient(180deg, #6B5D4F, #4A4035, #3E3529); }
.sidebar-top-tab.active {
    background: linear-gradient(180deg, #6B5D4F, #5A4E40, #494034);
    border-color: #494034;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
    z-index: 1;
}
.sidebar-top-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #494034;
}
.sidebar-top-tab img { width: 28px; height: 28px; image-rendering: pixelated; filter: drop-shadow(1px 1px 0 rgba(0,0,0,0.5)); }
.sidebar-top-tab[draggable="true"] { cursor: grab; }
.sidebar-top-tab.dragging { opacity: 0.35; cursor: grabbing; }

/* Bottom tabs (core) */
.sidebar-tabs {
    display: flex;
    height: 46px;
    background: #2A2118;
    border-bottom: 2px solid #000;
    border-top: 2px solid #000;
    flex-shrink: 0;
    gap: 1px;
    padding: 2px 2px 0;
}

.sidebar-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #584C3E, #3E3529, #2A2118);
    border: 1px solid #000;
    border-bottom: none;
    border-radius: 3px 3px 0 0;
    cursor: pointer;
    transition: background 0.1s;
    padding: 0;
    font-family: inherit;
    position: relative;
}

.sidebar-tab:hover { background: linear-gradient(180deg, #6B5D4F, #4A4035, #3E3529); }

.sidebar-tab.active {
    background: linear-gradient(180deg, #6B5D4F, #5A4E40, #494034);
    border-color: #494034;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
    z-index: 1;
}

/* Active tab bottom merges with panel */
.sidebar-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #494034;
}

.sidebar-tab img {
    width: 28px;
    height: 28px;
    image-rendering: pixelated;
    filter: drop-shadow(1px 1px 0 rgba(0,0,0,0.5));
}
.sidebar-tab[draggable="true"] { cursor: grab; }
.sidebar-tab.dragging { opacity: 0.35; cursor: grabbing; }

/* Sidebar body */
.sidebar-body {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    background: #2b271f;
}

/* =============================================
   SKILLS GRID (OSRS-style, always visible bottom-right)
   ============================================= */
.skill-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4px;
    padding: 4px;
    background: #1a1610;
}

.skill-cell {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 4px 4px 6px;
    background: #5a5043;
    background-image:
        repeating-linear-gradient(137deg, transparent, transparent 1px, rgba(0,0,0,0.04) 1px, transparent 2px),
        repeating-linear-gradient(31deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, transparent 3px),
        repeating-linear-gradient(82deg, transparent, transparent 1px, rgba(255,255,255,0.02) 1px, transparent 3px),
        repeating-linear-gradient(174deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, transparent 4px);
    cursor: pointer;
    transition: background 0.1s;
    border: 1px solid rgba(180, 160, 120, 0.25);
    aspect-ratio: 2 / 1;
    -webkit-mask:
        radial-gradient(circle 5px at 0 0, transparent 98%, black) top left,
        radial-gradient(circle 5px at 100% 0, transparent 98%, black) top right,
        radial-gradient(circle 5px at 0 100%, transparent 98%, black) bottom left,
        radial-gradient(circle 5px at 100% 100%, transparent 98%, black) bottom right;
    -webkit-mask-size: 51% 51%;
    -webkit-mask-repeat: no-repeat;
    mask:
        radial-gradient(circle 5px at 0 0, transparent 98%, black) top left,
        radial-gradient(circle 5px at 100% 0, transparent 98%, black) top right,
        radial-gradient(circle 5px at 0 100%, transparent 98%, black) bottom left,
        radial-gradient(circle 5px at 100% 100%, transparent 98%, black) bottom right;
    mask-size: 51% 51%;
    mask-repeat: no-repeat;
}

.skill-cell:hover {
    background: #6a6053;
    border-color: #3a3530;
}

.skill-cell.active {
    background: #6a6053;
    border-color: var(--gold-dim);
    box-shadow: inset 0 0 6px rgba(255,215,0,0.1);
}

.skill-cell.coming-soon {
    opacity: 0.4;
    cursor: default;
}

.sk-icon {
    width: 40px;
    height: 32px;
    image-rendering: pixelated;
    flex-shrink: 0;
}

.skill-cell[data-skill="strength"] .sk-icon,
.skill-cell[data-skill="defence"] .sk-icon,
.skill-cell[data-skill="cooking"] .sk-icon,
.skill-cell[data-skill="firemaking"] .sk-icon,
.skill-cell[data-skill="woodcutting"] .sk-icon {
    width: 32px;
}


.sk-levels {
    position: relative;
    margin-left: auto;
    width: 40px;
    height: 30px;
    flex-shrink: 0;
}

.sk-hi, .sk-lo, .sk-slash {
    position: absolute;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}

.sk-hi, .sk-lo {
    color: #ffff00;
    text-shadow: 1px 0 0 #000, -1px 0 0 #000, 0 1px 0 #000, 0 -1px 0 #000;
}

.sk-hi {
    top: -9px;
    left: -4px;
}

.sk-lo {
    bottom: -3px;
    right: 0;
}

.sk-slash {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%) rotate(45deg);
    color: transparent;
    font-size: 0;
    width: 1px;
    height: 60px;
    background: #000;
}

.total-level-cell {
    grid-column: 1 / -1;
    text-align: center;
    background: #5a5043;
    font-size: 11px;
    color: #ffff00;
    padding: 6px;
    font-weight: 700;
    text-shadow: 1px 0 0 #000, -1px 0 0 #000, 0 1px 0 #000, 0 -1px 0 #000;
}

.total-level-cell .total-num {
    color: #ffff00;
}

/* =============================================
   METHOD LIST (sidebar tab)
   ============================================= */
.method-list-head {
    padding: 6px 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--gold);
    background: linear-gradient(180deg, #3E3529, #2A2118);
    border-bottom: 1px solid #000;
    text-shadow: 1px 1px 0 #000;
}

.method-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px;
    background: #1a1610;
}

.method-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #5a5043;
    background-image:
        repeating-linear-gradient(137deg, transparent, transparent 1px, rgba(0,0,0,0.04) 1px, transparent 2px),
        repeating-linear-gradient(31deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, transparent 3px),
        repeating-linear-gradient(82deg, transparent, transparent 1px, rgba(255,255,255,0.02) 1px, transparent 3px),
        repeating-linear-gradient(174deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, transparent 4px);
    border: 1px solid rgba(180, 160, 120, 0.25);
    color: var(--white);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: background 0.1s;
    -webkit-mask:
        radial-gradient(circle 5px at 0 0, transparent 98%, black) top left,
        radial-gradient(circle 5px at 100% 0, transparent 98%, black) top right,
        radial-gradient(circle 5px at 0 100%, transparent 98%, black) bottom left,
        radial-gradient(circle 5px at 100% 100%, transparent 98%, black) bottom right;
    -webkit-mask-size: 51% 51%;
    -webkit-mask-repeat: no-repeat;
    mask:
        radial-gradient(circle 5px at 0 0, transparent 98%, black) top left,
        radial-gradient(circle 5px at 100% 0, transparent 98%, black) top right,
        radial-gradient(circle 5px at 0 100%, transparent 98%, black) bottom left,
        radial-gradient(circle 5px at 100% 100%, transparent 98%, black) bottom right;
    mask-size: 51% 51%;
    mask-repeat: no-repeat;
}

.method-row:hover:not(:disabled) {
    background: #6a6053;
    border-color: #3a3530;
}

.method-row.active {
    background: #6a6053;
    border-color: var(--gold-dim);
    box-shadow: inset 0 0 6px rgba(255,215,0,0.1);
}

.method-row.locked {
    opacity: 0.3;
    cursor: default;
}
.method-row.clog-complete {
    background: rgba(0, 255, 0, 0.08);
    border-color: rgba(0, 255, 0, 0.2);
}
.method-row.clog-complete .meth-name {
    color: #00ff00;
}
.method-row.clog-complete:hover:not(:disabled) {
    background: rgba(0, 255, 0, 0.14);
}
.method-row.clog-complete.active {
    background: rgba(0, 255, 0, 0.12);
    border-color: rgba(0, 255, 0, 0.3);
}

.awakened-toggle {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(0,0,0,0.3);
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.15s, background 0.15s;
    z-index: 1;
}
.awakened-toggle:hover { opacity: 0.8; }
.awakened-toggle.active {
    opacity: 1;
    background: rgba(255, 102, 0, 0.25);
    box-shadow: 0 0 4px rgba(255, 102, 0, 0.3);
}
.icon-awakened-orb { width: 16px; height: 16px; image-rendering: pixelated; }
.awakened-count { font-size: 10px; color: #ccc; }
.awakened-toggle.active .awakened-count { color: #ff6600; }

.meth-icon { flex-shrink: 0; }

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

.meth-name {
    font-weight: 700;
    font-size: 13px;
    display: block;
}
.superior-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    color: #000;
    font-size: 9px;
    font-weight: 800;
    margin-left: 4px;
    vertical-align: middle;
    cursor: help;
    line-height: 1;
}

.meth-info {
    font-size: 11px;
    color: var(--muted);
    display: block;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meth-lock {
    color: var(--red);
    font-size: 10px;
}

.meth-stats {
    flex-shrink: 0;
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.meth-xp { color: var(--green); font-size: 11px; font-weight: 600; text-shadow: 1px 1px 0 #000; }
.meth-rate { color: var(--muted); font-size: 9px; }
.meth-gp { color: var(--gold); font-size: 10px; }

/* =============================================
   RAIDS "COMING SOON" BANNER
   ============================================= */
.raid-coming-soon {
    position: relative;
    margin: 4px 0;
    background: repeating-linear-gradient(
        45deg,
        #1a1610,
        #1a1610 10px,
        #2a2118 10px,
        #2a2118 20px
    );
    border: 2px solid #000;
    overflow: hidden;
    opacity: 0.7;
}
.raid-tape-top, .raid-tape-bottom {
    height: 14px;
    background: repeating-linear-gradient(
        -45deg,
        #c4a000 0px, #c4a000 10px,
        #1a1a1a 10px, #1a1a1a 20px
    );
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
}
.raid-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 14px 8px;
}
.raid-icon {
    width: 36px;
    height: 36px;
    image-rendering: pixelated;
    filter: grayscale(60%) brightness(0.7);
}
.raid-text {
    font-family: 'RS Bold', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #c4a000;
    letter-spacing: 3px;
    text-shadow: 1px 1px 0 #000, 0 0 8px rgba(196,160,0,0.3);
}

/* =============================================
   RAID UI
   ============================================= */

/* Raid hub — rendered in vp-center */
/* === Raid Hub === */
.raid-hub {
    text-align: center;
    padding: 6px 4px;
    width: 100%;
}
.raid-hub-title {
    color: #ff981f;
    font-family: 'RS Bold', sans-serif;
    font-size: 15px;
    margin-bottom: 8px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}
.raid-hub-logo { margin-bottom: 8px; }
.raid-hub-logo .icon { width: 64px; height: 64px; }
.raid-splash-logo .icon { width: 96px; height: 96px; }
.raid-hub-label {
    color: #c9a86c;
    font-size: 11px;
    margin-bottom: 4px;
}
.raid-hub-req {
    color: #888;
    font-size: 10px;
    margin: 4px 0;
}

/* Raid weapon row (3 slots) */
.raid-weapon-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 6px;
}
.raid-weapon-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 8px;
    background: #1a1a1a;
    border: 2px solid #555;
    border-radius: 6px;
    cursor: pointer;
    min-width: 85px;
    transition: border-color 0.2s;
}
.raid-weapon-slot:hover { border-color: #ff981f; }
.raid-weapon-style {
    font-size: 10px;
    color: #ff981f;
    text-transform: capitalize;
}
.raid-weapon-icon {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
}
.raid-weapon-name {
    font-size: 9px;
    color: #c9a86c;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.raid-weapon-count {
    font-size: 8px;
    color: #888;
}

/* Loadout editor panel (overlay) */
.raid-editor-panel {
    width: 400px;
    max-height: 550px;
    overflow: auto;
}

/* Style tabs (Melee / Ranged / Magic) */
.raid-tab-row {
    display: flex;
    justify-content: center;
    gap: 3px;
    margin-bottom: 0;
}
.raid-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 18px;
    background: #1a1610;
    border: 1px solid #494034;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    color: #888;
    font-family: 'RS Bold', sans-serif;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
    top: 1px;
}
.raid-tab .icon { width: 18px; height: 18px; }
.raid-tab-label { text-transform: capitalize; }
.raid-tab-check { color: #4a4; font-size: 12px; margin-left: 3px; }
.raid-tab:hover { color: #c9a86c; border-color: #6a5a44; }
.raid-tab.active {
    background: #2b271f;
    border-color: #ff981f;
    color: #ff981f;
    z-index: 1;
}

/* Loadout panel (below tabs) */
.raid-loadout-panel {
    background: #2b271f;
    border: 1px solid #ff981f;
    border-radius: 0 0 4px 4px;
    padding: 10px;
    margin-bottom: 10px;
}

/* Mini equipment grid (OSRS cross layout) */
.raid-equip-grid {
    display: grid;
    grid-template-columns: repeat(3, 50px);
    grid-template-areas:
        ".     head  .   "
        "cape  neck  ammo"
        "wep   body  shld"
        ".     legs  .   "
        "glov  boot  ring";
    gap: 4px;
    justify-content: center;
    margin-bottom: 8px;
}
.raid-eq-slot {
    width: 50px;
    height: 50px;
    background: #1a1610;
    border: 2px solid #494034;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.15s;
    image-rendering: pixelated;
}
.raid-eq-slot:hover { border-color: #c9a86c; }
.raid-eq-slot.filled { border-color: #6a5a34; background: #252118; }
.raid-eq-slot.weapon-slot { border-color: #ff981f; box-shadow: 0 0 4px rgba(255,152,31,0.3); }
.raid-eq-slot.weapon-slot:not(.filled) { border-style: dashed; }
.raid-eq-slot[data-slot="helmet"]  { grid-area: head; }
.raid-eq-slot[data-slot="cape"]    { grid-area: cape; }
.raid-eq-slot[data-slot="neck"]    { grid-area: neck; }
.raid-eq-slot[data-slot="ammo"]    { grid-area: ammo; }
.raid-eq-slot[data-slot="weapon"]  { grid-area: wep; }
.raid-eq-slot[data-slot="body"]    { grid-area: body; }
.raid-eq-slot[data-slot="shield"]  { grid-area: shld; }
.raid-eq-slot[data-slot="legs"]    { grid-area: legs; }
.raid-eq-slot[data-slot="gloves"]  { grid-area: glov; }
.raid-eq-slot[data-slot="boots"]   { grid-area: boot; }
.raid-eq-slot[data-slot="ring"]    { grid-area: ring; }
.icon-raid-slot { width: 40px; height: 40px; image-rendering: pixelated; }
.icon-raid-placeholder { width: 34px; height: 34px; opacity: 0.3; }

/* Action buttons below grid */
.raid-loadout-actions {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}
.raid-action-btn {
    padding: 5px 14px;
    font-size: 12px;
    font-family: 'RS Bold', sans-serif;
    color: #c9a86c;
    background: #1a1610;
    border: 1px solid #494034;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s;
}
.raid-action-btn:hover { border-color: #ff981f; color: #ff981f; }
.raid-action-clear { color: #a66; }
.raid-action-clear:hover { border-color: #c44; color: #c44; }

/* Boss lineup in raid hub */
.raid-boss-lineup {
    display: flex;
    gap: 3px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.raid-lineup-boss { text-align: center; }
.raid-lineup-icon {
    width: 38px; height: 38px;
    border: 1px solid #494034;
    border-radius: 3px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.4);
    overflow: visible;
}
.raid-lineup-icon .icon { width: 36px; height: 36px; }
.raid-lineup-label {
    font-size: 7px;
    color: #888;
    margin-top: 1px;
}

/* Raid hub footer — enter button + repeat toggle */
.raid-hub-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
    gap: 6px;
}
.raid-enter-btn {
    display: block;
    padding: 7px 22px;
    background: linear-gradient(180deg, #4a3a1a, #2a2010);
    border: 2px solid #ff981f;
    color: #ff981f;
    font-family: 'RS Bold', sans-serif;
    font-size: 13px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
}
.raid-enter-btn:hover { background: linear-gradient(180deg, #5a4a2a, #3a3020); }
.raid-auto-restart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
}
.raid-auto-label {
    font-family: 'RS Plain', serif;
    font-size: 12px;
    color: #FF981F;
    text-shadow: 1px 1px 0 #000;
}
.raid-cancel-repeat {
    margin-top: 4px;
    padding: 3px 10px;
    background: #2a1a1a;
    border: 1px solid #882222;
    border-radius: 3px;
    color: #cc4444;
    font-family: 'RS Plain', serif;
    font-size: 11px;
    cursor: pointer;
    text-shadow: 1px 1px 0 #000;
}
.raid-cancel-repeat:hover { background: #3a2020; border-color: #aa3333; }

/* Advanced settings button in hub */
.raid-advanced-btn {
    display: block;
    margin: 6px auto 0;
    font-size: 11px;
    padding: 4px 14px;
}
.raid-advanced-panel { width: 420px; }
.raid-adv-desc {
    font-size: 12px;
    color: #888;
    text-align: center;
    margin-bottom: 10px;
    line-height: 1.4;
}
.raid-adv-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid #2a2520;
}
.raid-adv-row:last-child { border-bottom: none; }
.raid-adv-boss {
    flex-shrink: 0;
    width: 60px;
    text-align: center;
}
.raid-adv-icon { width: 40px; height: 40px; margin: 0 auto; }
.raid-adv-icon .icon { width: 40px; height: 40px; }
.raid-adv-label {
    font-size: 11px;
    color: #c9a86c;
    margin-top: 3px;
    text-shadow: 1px 1px 0 #000;
}
.raid-adv-controls { flex: 1; }
.raid-adv-loadout-row {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.raid-adv-lo-btn {
    padding: 4px 10px;
    font-family: 'RS Plain', serif;
    font-size: 12px;
    background: #1a1610;
    border: 1px solid #494034;
    color: #888;
    cursor: pointer;
    border-radius: 2px;
}
.raid-adv-lo-btn:hover { border-color: #6B5D4F; color: #c9a86c; }
.raid-adv-lo-btn.active { border-color: #ff981f; color: #ff981f; background: #2a2010; }
.raid-adv-style-row {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.raid-adv-style-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    font-family: 'RS Plain', serif;
    font-size: 12px;
    background: #1a1610;
    border: 1px solid #494034;
    color: #888;
    cursor: pointer;
    border-radius: 2px;
}
.raid-adv-style-btn .icon { width: 18px; height: 18px; }
.raid-adv-style-btn:hover { border-color: #6B5D4F; color: #c9a86c; }
.raid-adv-style-btn.active { border-color: #ff981f; color: #ff981f; background: #2a2010; }
.raid-adv-no-weapon {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.raid-prayer-row {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #3a3025;
}
.raid-prayer-label {
    color: #aaa;
    font-size: 12px;
    margin-right: 3px;
}
.raid-prayer-opt {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #2a2218;
    border: 1px solid #3a3025;
    border-radius: 3px;
    color: #c9a86c;
    font-size: 12px;
    cursor: pointer;
}
.raid-prayer-opt:hover { border-color: #ff981f; }
.raid-prayer-opt.active {
    border-color: #ff981f;
    background: #3a2a10;
    color: #ff981f;
}
.raid-prayer-opt .icon { width: 18px; height: 18px; }

/* Raid item picker option */
.raid-weapon-option {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 6px 8px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 3px;
    cursor: pointer;
    margin-bottom: 3px;
    transition: border-color 0.15s;
}
.raid-weapon-option:hover { border-color: #ff981f; background: #2a2a1a; }
.raid-weapon-option.selected { border-color: #ff981f; background: #2a2518; }

/* Raid ads row — flanks boss circle */
.raid-ads-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.raid-ads-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.raid-ad {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px;
    background: radial-gradient(circle, rgba(100,20,20,0.3) 0%, transparent 70%),
                rgba(30, 15, 15, 0.3);
    border: 2px solid #cc3333;
    border-radius: 50%;
    width: 140px;
    height: 140px;
    cursor: pointer;
    animation: adPulse 1s infinite;
    transition: border-color 0.2s;
}
.raid-ad.targeted { border-color: #ff981f; box-shadow: 0 0 12px rgba(255,152,31,0.5); animation: none; }
.raid-ad-icon { display: flex; align-items: center; justify-content: center; flex: 1; }
.raid-ad-icon .icon { width: 64px; height: 64px; }
.raid-ad-hp { width: 80%; height: 3px; background: #333; border-radius: 2px; overflow: hidden; }
.raid-ad-hp-fill { height: 100%; background: #cc0000; transition: width 0.1s; }

@keyframes adPulse {
    0%, 100% { box-shadow: 0 0 6px rgba(204,51,51,0.4); }
    50% { box-shadow: 0 0 16px rgba(204,51,51,0.8); }
}

/* Bloat vulnerability */
.vuln-flash {
    animation: vulnFlash 0.5s infinite !important;
}
.vuln-active {
    box-shadow: 0 0 30px rgba(0,200,0,0.6) !important;
    border-color: #00cc00 !important;
}
@keyframes vulnFlash {
    0%, 100% { box-shadow: 0 0 8px rgba(0,200,0,0.2); }
    50% { box-shadow: 0 0 20px rgba(0,200,0,0.6); border-color: #00cc00; }
}

/* Nylo queue indicators */
.nylo-queue {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 4px 0;
}
.nylo-queue-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #666;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20,20,20,0.4);
}
.nylo-queue-dot .icon { width: 20px; height: 20px; }
.nylo-queue-dot.melee { border-color: #cccccc; }
.nylo-queue-dot.ranged { border-color: #33cc33; }
.nylo-queue-dot.magic { border-color: #3399ff; }

/* Vasilias descent animation */
.vasilias-descent {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 15;
    animation: vasiliasDrop 1.5s ease-out forwards;
    pointer-events: none;
}
.web-string {
    width: 2px;
    height: 80px;
    background: linear-gradient(180deg, #999, #666);
}
.vasilias-icon {
    margin-top: -4px;
}
@keyframes vasiliasDrop {
    0% { top: -100px; opacity: 0; }
    30% { opacity: 1; }
    100% { top: 60px; opacity: 1; }
}

/* Status effect bar */
.status-effect-bar {
    text-align: center;
    margin-bottom: 6px;
    padding: 4px 8px;
    background: rgba(0,0,0,0.5);
    border-radius: 4px;
}
.status-label {
    font-size: 11px;
    font-family: 'RS Bold', sans-serif;
    margin-bottom: 3px;
}
.status-progress {
    height: 4px;
    background: #333;
    border-radius: 2px;
    overflow: hidden;
}
.status-fill {
    height: 100%;
    transition: width 0.1s;
    border-radius: 2px;
}

/* Xarpus states */
.xarpus-vuln {
    box-shadow: 0 0 20px rgba(0,200,0,0.4) !important;
}
.xarpus-danger {
    box-shadow: 0 0 20px rgba(200,0,0,0.4) !important;
}

/* =============================================
   BANK (sidebar tab)
   ============================================= */
.bank-wrap {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.bank-head {
    padding: 6px 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--gold);
    background: linear-gradient(180deg, #3E3529, #2A2118);
    border-bottom: 1px solid #000;
    text-shadow: 1px 1px 0 #000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.bank-head-right {
    display: flex;
    align-items: center;
    gap: 6px;
}
.bank-head-info {
    font-size: 10px;
    color: var(--muted);
    font-weight: 400;
}
.bank-sort-btn {
    font-size: 10px;
    padding: 2px 8px;
    line-height: 1.2;
}

/* Bank search bar */
.bank-search-wrap {
    padding: 4px 6px;
    background: linear-gradient(180deg, #3E3529, #2A2118);
    border-bottom: 1px solid #000;
    flex-shrink: 0;
}
.bank-search {
    width: 100%;
    box-sizing: border-box;
    padding: 3px 6px;
    font-family: 'RS Plain', serif;
    font-size: 14px;
    color: var(--white);
    background: #1a1610;
    border: 1px solid #0d0b08;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
    outline: none;
}
.bank-search::placeholder {
    color: var(--muted);
}
.bank-search:focus {
    border-color: var(--gold);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.5), 0 0 3px rgba(255,215,0,0.2);
}

/* === Global Item Search === */
.global-search-wrap {
    position: relative;
    flex-shrink: 1;
    min-width: 100px;
    max-width: 180px;
}
.global-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 3px 8px;
    font-family: 'RS Plain', serif;
    font-size: 13px;
    color: var(--white);
    background: #1a1610;
    border: 1px solid #0d0b08;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
    outline: none;
    border-radius: 2px;
    height: 28px;
}
.global-search-input::placeholder { color: var(--muted); }
.global-search-input:focus {
    border-color: var(--gold);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.5), 0 0 3px rgba(255,215,0,0.2);
}
.global-search-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
    background: #3a342c;
    background-image: linear-gradient(180deg, #332e27 0%, #3a342c 15%, #3a342c 85%, #2e2922 100%);
    border: 2px solid #000;
    box-shadow: inset 1px 1px 0 #6B6256, 0 6px 24px rgba(0,0,0,0.7);
    z-index: 200;
    border-radius: 0 0 2px 2px;
}
.gs-result-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0,0,0,0.3);
}
.gs-result-row:hover { background: var(--cell-hover); }
.gs-result-icon { width: 24px; height: 24px; image-rendering: pixelated; flex-shrink: 0; }
.gs-result-name { color: var(--white); font-size: 13px; }
.gs-empty {
    padding: 16px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
}
.gs-source-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid #1a1610;
    background: linear-gradient(180deg, #3E3529, #2A2118);
}
.gs-back-btn {
    cursor: pointer;
    color: var(--gold);
    font-size: 16px;
    font-weight: bold;
    padding: 0 4px;
}
.gs-back-btn:hover { color: #FFE873; }
.gs-source-item-icon { width: 28px; height: 28px; image-rendering: pixelated; }
.gs-source-item-name {
    font-family: 'RS Bold', 'RS Plain', serif;
    font-size: 15px;
    color: #FF981F;
    text-shadow: 1px 1px 0 #000;
}
.gs-source-section { border-bottom: 1px solid rgba(0,0,0,0.2); }
.gs-source-section-title {
    font-family: 'RS Bold', 'RS Plain', serif;
    font-size: 11px;
    color: var(--gold);
    text-shadow: 1px 1px 0 #000;
    padding: 6px 10px 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.gs-source-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 18px;
    font-size: 12px;
}
.gs-source-icon { width: 20px; height: 20px; image-rendering: pixelated; flex-shrink: 0; }
.gs-source-text { color: var(--white); flex: 1; }
.gs-source-detail {
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
}

/* Processing chain (unprocessed → processed visual) */
.gs-chain {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
}
.gs-chain-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 6px;
    border-radius: 3px;
    cursor: pointer;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.05);
    min-width: 48px;
    transition: background 0.15s;
}
.gs-chain-node:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,215,0,0.3);
}
.gs-chain-node.gs-chain-current {
    background: rgba(255,152,31,0.15);
    border-color: #FF981F;
    box-shadow: 0 0 4px rgba(255,152,31,0.3);
    cursor: default;
}
.gs-chain-icon {
    width: 24px;
    height: 24px;
    image-rendering: pixelated;
}
.gs-chain-label {
    font-size: 10px;
    color: #ccc;
    text-align: center;
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
}
.gs-chain-arrow {
    color: #999;
    font-size: 16px;
    flex-shrink: 0;
}
.gs-chain-plus {
    color: #999;
    font-size: 12px;
    flex-shrink: 0;
}
.gs-chain-qty {
    font-size: 10px;
    color: #ff0;
    text-shadow: 1px 1px 0 #000;
    line-height: 1;
}

/* Bank tab bar */
.bank-tab-bar {
    display: flex;
    gap: 0;
    background: linear-gradient(180deg, #3E3529, #2A2118);
    border-bottom: 1px solid #000;
    padding: 2px 4px;
    flex-shrink: 0;
}
.bank-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px 2px;
    background: linear-gradient(180deg, #4a3c2a, #362a1c);
    border: 1px solid #1a1510;
    border-radius: 3px 3px 0 0;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.15s, background 0.15s;
}
.bank-tab:hover { opacity: 0.85; background: linear-gradient(180deg, #5a4c38, #4a3c2a); }
.bank-tab.active {
    opacity: 1;
    background: linear-gradient(180deg, #5c4a30, #483820);
    border-bottom-color: #483820;
    box-shadow: inset 0 1px 0 rgba(255,215,0,0.15);
}
.bank-tab.empty { opacity: 0.3; }
.bank-tab.empty:hover { opacity: 0.5; }
.icon-bank-tab { width: 18px; height: 18px; image-rendering: pixelated; }

.bank-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    padding: 0;
    background: var(--cell-bg);
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    align-content: start;
}

.bank-grid.sell-mode {
    background: #3E2020;
}
.bank-grid.sell-mode .bank-item:active {
    background: rgba(107, 48, 48, 0.5);
}
.osrs-btn.danger.active {
    background: linear-gradient(180deg, #8B4040, #6B3030);
    box-shadow: inset -1px -1px 0 #8B4040, inset 1px 1px 0 #2A1414;
}

.bank-item {
    background: transparent;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    min-height: 42px;
    cursor: default;
}

.bank-item.equipable { cursor: pointer; }
.bank-item.equipable:hover { background: var(--cell-active); box-shadow: inset 0 0 0 1px var(--gold-dim); }
.bank-item.bank-dragging { opacity: 0.3; }
.bank-item.bank-drag-over { background: rgba(255, 215, 0, 0.15); box-shadow: inset 0 0 0 1px var(--gold-dim); }
.bank-item.bank-item-use-selected { outline: 2px solid white; outline-offset: -2px; filter: brightness(1.2); cursor: pointer; }
.bank-item:hover { cursor: pointer; }

.bi-qty {
    position: absolute;
    top: 2px;
    left: 30px;
    font-size: 10px;
    font-weight: 700;
    color: #ffff00;
    text-shadow: 1px 0 0 #000, -1px 0 0 #000, 0 1px 0 #000, 0 -1px 0 #000;
    z-index: 1;
    line-height: 1;
}
.bi-qty.qty-white { color: #ffffff; }
.bi-qty.qty-green { color: #00ff80; }
.bi-qty.qty-white-high { color: #ffffff; }

.bank-lock {
    position: absolute;
    bottom: 1px;
    left: 1px;
    font-size: 9px;
    z-index: 2;
    line-height: 1;
    filter: drop-shadow(0 0 1px #000);
    pointer-events: none;
    opacity: 0.7;
}
.bank-2h-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    z-index: 2;
    pointer-events: none;
    width: 14px;
    height: 14px;
    opacity: 0.85;
}
.bank-2h-badge img {
    width: 14px;
    height: 14px;
    image-rendering: pixelated;
    filter: brightness(0.7);
}
.bank-2h-x {
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #ff3333;
    text-shadow: 0 0 2px #000, 0 0 2px #000;
    line-height: 1;
}
.bi-name { display: none; }
.bi-val { font-size: 8px; color: var(--gold-dim); }
.bi-equip { font-size: 8px; color: var(--gold); font-weight: 700; text-transform: uppercase; }
.ge-tag { font-size: 9px; background: #1a6b1a; color: #7fff7f; padding: 1px 4px; border-radius: 3px; font-weight: 700; vertical-align: middle; }

.bank-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px 10px;
    color: var(--muted);
    font-size: 12px;
}

.bank-foot {
    padding: 6px 8px;
    background: linear-gradient(180deg, #2A2118, #1E1912);
    border-top: 1px solid #000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--muted);
    flex-shrink: 0;
}

/* Sell All Confirmation */
.sell-all-confirm {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(180deg, #3A2A1A, #1E1912);
    border-top: 2px solid #ff3333;
    padding: 12px 16px;
    text-align: center;
    z-index: 50;
}
.sell-all-warn-title {
    color: #ff3333;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 6px;
}
.sell-all-warn-text {
    color: var(--light);
    font-size: 12px;
    margin-bottom: 4px;
}
.sell-all-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 10px;
}
.sell-all-buttons .osrs-btn {
    min-width: 80px;
}
.sell-junk-presets {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin: 8px 0;
    flex-wrap: wrap;
}
.sell-junk-preset {
    font-size: 11px !important;
    padding: 3px 8px !important;
    min-width: auto !important;
}
.sell-junk-input-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 8px 0;
}
.sell-junk-input {
    width: 100px;
    padding: 4px 8px;
    background: #1a1410;
    border: 1px solid #5c4a3a;
    color: #ffd700;
    font-family: 'RS Plain', sans-serif;
    font-size: 14px;
    text-align: center;
    border-radius: 2px;
}
.sell-junk-input:focus {
    outline: none;
    border-color: #FF981F;
}
.sell-junk-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--light);
    font-size: 12px;
    margin: 6px 0;
    cursor: pointer;
}
.sell-junk-toggle input {
    accent-color: #43ac35;
    cursor: pointer;
}

/* Loot Log */
.loot-log-list { display: flex; flex-direction: column; }
.loot-log-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0,0,0,0.3);
    background: var(--cell-bg);
    transition: background 0.1s;
}
.loot-log-row:hover { background: var(--cell-active); }
.loot-log-icon { width: 32px; height: 32px; image-rendering: pixelated; flex-shrink: 0; }
.loot-log-info { flex: 1; min-width: 0; }
.loot-log-name { font-size: 12px; font-weight: 700; color: var(--gold); text-shadow: 1px 1px 0 #000; }
.loot-log-stats { font-size: 10px; color: var(--muted); }
.loot-log-kc { font-size: 12px; font-weight: 700; color: var(--white); text-shadow: 1px 1px 0 #000; white-space: nowrap; }

/* =============================================
   COLLECTION LOG
   ============================================= */
.clog-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 6px 10px;
    background: linear-gradient(180deg, #4a4035, #3a322a);
    border-bottom: 2px solid #000;
}
.clog-header-title {
    font-size: 14px; font-weight: 700; color: var(--gold);
    text-shadow: 1px 1px 0 #000; font-family: 'RS Bold', 'RS Plain', serif;
}
.clog-header-count { font-size: 11px; color: var(--white); text-shadow: 1px 1px 0 #000; }

.clog-tabs {
    display: flex; gap: 0; border-bottom: 2px solid #000;
}
.clog-tab {
    flex: 1; padding: 6px 4px; text-align: center;
    font-size: 11px; font-weight: 700; color: var(--muted);
    background: linear-gradient(180deg, #4a4035, #3a322a);
    cursor: pointer; border-right: 1px solid rgba(0,0,0,0.4);
    text-shadow: 1px 1px 0 #000; transition: background 0.1s;
}
.clog-tab:last-child { border-right: none; }
.clog-tab:hover { background: linear-gradient(180deg, #5a5045, #4a423a); }
.clog-tab.active { color: var(--gold); background: linear-gradient(180deg, #5d5549, #4a4035); border-bottom: 2px solid var(--gold); margin-bottom: -2px; }

.clog-source-list { display: flex; flex-direction: column; overflow-y: auto; }
.clog-source-row {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 8px; cursor: pointer;
    border-bottom: 1px solid rgba(0,0,0,0.3);
    background: var(--cell-bg); transition: background 0.1s;
}
.clog-source-row:hover { background: var(--cell-active); }
.clog-source-icon { width: 28px; height: 28px; image-rendering: pixelated; flex-shrink: 0; }
.clog-source-info { flex: 1; min-width: 0; }
.clog-source-name { font-size: 12px; font-weight: 700; text-shadow: 1px 1px 0 #000; }
.clog-source-progress { font-size: 10px; color: var(--muted); }
.clog-source-complete .clog-source-name { color: #00ff00; }
.clog-source-partial .clog-source-name { color: #ff981f; }
.clog-source-empty .clog-source-name { color: var(--white); }

.clog-detail-head {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 10px;
    background: linear-gradient(180deg, #4a4035, #3a322a);
    border-bottom: 2px solid #000;
}
.clog-detail-icon { width: 36px; height: 36px; image-rendering: pixelated; }
.clog-detail-info { flex: 1; }
.clog-detail-name { font-size: 14px; font-weight: 700; color: var(--gold); text-shadow: 1px 1px 0 #000; font-family: 'RS Bold', 'RS Plain', serif; }
.clog-detail-name.clog-clickable { cursor: pointer; text-decoration: underline; text-decoration-color: rgba(255,152,31,0.4); text-underline-offset: 2px; }
.clog-detail-name.clog-clickable:hover { color: #fff; text-decoration-color: #fff; }
.clog-detail-kc { font-size: 11px; color: var(--white); text-shadow: 1px 1px 0 #000; }

.clog-item-grid {
    display: flex; flex-wrap: wrap; gap: 2px; padding: 8px;
    justify-content: flex-start;
}
.clog-item {
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.3); border: 1px solid rgba(0,0,0,0.4); border-radius: 2px;
    position: relative; cursor: pointer;
}
.clog-item img { width: 30px; height: 30px; image-rendering: pixelated; }
.clog-item.obtained { }
.clog-item.missing img { opacity: 0.3; filter: grayscale(0.5); }
.clog-item .clog-qty {
    position: absolute; top: 0; left: 1px;
    font-size: 9px; color: #ffff00; text-shadow: 1px 1px 0 #000;
    font-weight: 700; line-height: 1;
}

.chat-line .log-clog { color: #00ff00; font-weight: 700; }

/* Collection log popup notification */
.clog-popup {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: linear-gradient(180deg, #4a4035, #332c24);
    border: 2px solid #000;
    border-radius: 3px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 4px 12px rgba(0,0,0,0.6);
    z-index: 60;
    animation: clogSlideIn 0.3s ease-out;
    pointer-events: none;
}
.clog-popup-icon {
    width: 28px;
    height: 28px;
    image-rendering: pixelated;
    flex-shrink: 0;
}
.clog-popup-text {
    display: flex;
    flex-direction: column;
}
.clog-popup-title {
    font-size: 11px;
    font-weight: 700;
    color: #00ff00;
    text-shadow: 1px 1px 0 #000;
    font-family: 'RS Bold', 'RS Plain', serif;
}
.clog-popup-item {
    font-size: 11px;
    color: var(--white);
    text-shadow: 1px 1px 0 #000;
    white-space: nowrap;
}
.clog-popup-fade {
    animation: clogFadeOut 0.5s ease-in forwards;
}
@keyframes clogSlideIn {
    0% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes clogFadeOut {
    0% { opacity: 1; }
    100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

.osrs-btn {
    background: linear-gradient(180deg, #6B5D4F, #3E3529);
    border: 1px solid #000;
    box-shadow: inset 1px 1px 0 var(--frame-hi), inset -1px -1px 0 var(--frame-lo);
    color: var(--white);
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.osrs-btn:active {
    box-shadow: inset -1px -1px 0 var(--frame-hi), inset 1px 1px 0 var(--frame-lo);
    background: linear-gradient(180deg, #3E3529, #6B5D4F);
}

.osrs-btn.danger {
    background: linear-gradient(180deg, #6B3030, #3E2020);
    box-shadow: inset 1px 1px 0 #8B4040, inset -1px -1px 0 #2A1414;
}

/* =============================================
   SHOP (uses bank-grid layout)
   ============================================= */
.shop-item { cursor: pointer; }
.shop-item:hover { background: var(--cell-active); box-shadow: inset 0 0 0 1px var(--gold-dim); }
.shop-item.poor { opacity: 0.35; }
.shop-item.owned { opacity: 0.5; cursor: default; }
.shop-item.owned:hover { background: transparent; box-shadow: none; }
.shop-item .bi-qty { color: var(--gold); }


/* =============================================
   EQUIPMENT (OSRS cross layout)
   ============================================= */
.equip-grid {
    display: grid;
    grid-template-columns: repeat(3, 50px);
    grid-template-rows: auto auto auto auto auto;
    grid-template-areas:
        ".     head  .   "
        "cape  neck  ammo"
        "wep   body  shld"
        ".     legs  .   "
        "glov  boot  ring";
    gap: 4px;
    padding: 10px;
    justify-content: center;
    background: var(--cell-bg);
}

.eq-slot {
    width: 50px;
    height: 50px;
    background: #1a1610;
    border: 2px solid #494034;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.1s, border-color 0.1s;
    position: relative;
}

.eq-slot:hover {
    border-color: #c9a86c;
}

.eq-slot.filled {
    border-color: #6a5a34;
    background: #252118;
}

.icon-slot-placeholder {
    width: 36px;
    height: 36px;
    image-rendering: pixelated;
    opacity: 0.5;
}

.eq-name {
    font-size: 7px;
    color: var(--white);
    text-align: center;
    position: absolute;
    bottom: 1px;
    left: 0;
    right: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 1px 1px 0 #000;
}

.eq-section-head {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    color: var(--gold);
    background: linear-gradient(180deg, #3E3529, #2A2118);
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    text-shadow: 1px 1px 0 #000;
}

.equip-tools {
    display: flex;
    gap: 4px;
    padding: 10px 24px;
    background: var(--cell-bg);
    justify-content: center;
}

.equip-stats {
    padding: 10px 12px;
    background: var(--cell-bg);
    border-top: 1px solid #111;
}

.eq-stat-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 6px;
    text-shadow: 1px 1px 0 #000;
}

.eq-stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--white);
    padding: 3px 0;
    border-bottom: 1px solid #1a1610;
}

.eq-stat-row.muted { color: var(--muted); }

/* Loadout controls */
.loadout-controls {
    padding: 8px 12px;
    background: var(--cell-bg);
    border-top: 1px solid #111;
}
.loadout-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
}
.loadout-name {
    flex: 1;
    color: var(--white);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.loadout-btn {
    padding: 2px 8px !important;
    font-size: 10px !important;
    min-width: 0 !important;
}
.loadout-del {
    background: linear-gradient(180deg, #8b3a3a 0%, #6b2222 100%) !important;
    border-color: #4a1515 !important;
}
.loadout-del:hover {
    background: linear-gradient(180deg, #a04040 0%, #802828 100%) !important;
}
.loadout-save-row {
    padding: 6px 0;
    text-align: center;
}
.loadout-activity-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    border-top: 1px solid #333;
    margin-top: 4px;
    flex-wrap: wrap;
}
.loadout-activity-label {
    flex: 1;
    font-size: 11px;
    color: var(--white);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.loadout-prompt {
    display: flex;
    gap: 6px;
    align-items: center;
    padding: 6px 0;
    border-top: 1px solid #333;
    margin-top: 4px;
}
.loadout-input {
    flex: 1;
    background: #1a1610;
    border: 1px solid #494034;
    color: var(--white);
    padding: 4px 6px;
    font-size: 12px;
    font-family: inherit;
    min-width: 0;
}
.loadout-input:focus {
    outline: none;
    border-color: var(--gold-dim);
}

/* Equipment loadout tabs */
.equip-tab-row {
    display: flex;
    gap: 2px;
    padding: 6px 8px;
    background: linear-gradient(180deg, #3E3529, #2A2118);
    border-bottom: 1px solid #000;
}
.equip-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 4px;
    background: #1a1610;
    border: 1px solid #494034;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.1s, border-color 0.1s;
}
.equip-tab:hover {
    background: #2b271f;
    border-color: #6B5D4F;
    color: var(--white);
}
.equip-tab.active {
    background: #2b271f;
    border-color: var(--gold-dim);
    color: var(--gold);
    box-shadow: inset 0 0 8px rgba(255,215,0,0.08);
}
.equip-tab-num {
    font-size: 13px;
}

/* Equipment prayer row */
.equip-prayer-row {
    display: flex;
    gap: 3px;
    padding: 6px 10px;
    background: var(--cell-bg);
    flex-wrap: wrap;
}
.equip-prayer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px 6px;
    background: #1a1610;
    border: 1px solid #494034;
    color: var(--white);
    font-size: 10px;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.1s, border-color 0.1s;
}
.equip-prayer-btn:hover {
    background: #2b271f;
    border-color: #6B5D4F;
}
.equip-prayer-btn.active {
    background: #2b271f;
    border-color: var(--gold-dim);
    color: var(--gold);
    box-shadow: inset 0 0 6px rgba(255,215,0,0.1);
}

/* Equipment combat style row */
.equip-style-row {
    display: flex;
    gap: 3px;
    padding: 6px 10px;
    background: var(--cell-bg);
    flex-wrap: wrap;
}
.equip-style-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 4px;
    background: #1a1610;
    border: 1px solid #494034;
    color: var(--white);
    font-size: 10px;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.1s, border-color 0.1s;
    min-width: 0;
}
.equip-style-btn:hover {
    background: #2b271f;
    border-color: #6B5D4F;
}
.equip-style-btn.active {
    background: #2b271f;
    border-color: var(--gold-dim);
    color: var(--gold);
    box-shadow: inset 0 0 6px rgba(255,215,0,0.1);
}
.equip-style-btn span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Equipment action buttons */
.equip-actions {
    display: flex;
    gap: 4px;
    padding: 6px 10px;
    background: var(--cell-bg);
    border-top: 1px solid #111;
}
.equip-action-btn {
    flex: 1;
    padding: 5px 8px;
    background: linear-gradient(180deg, #4a4030, #3a3020);
    border: 1px solid #5a5040;
    color: var(--white);
    font-size: 10px;
    font-family: inherit;
    cursor: pointer;
    text-align: center;
}
.equip-action-btn:hover {
    background: linear-gradient(180deg, #5a5040, #4a4030);
    border-color: var(--gold-dim);
}
.equip-action-clear {
    background: linear-gradient(180deg, #8b3a3a 0%, #6b2222 100%);
    border-color: #4a1515;
}
.equip-action-clear:hover {
    background: linear-gradient(180deg, #a04040 0%, #802828 100%);
}
.equip-loadout-apply {
    width: calc(100% - 16px);
    margin: 8px auto;
    display: block;
    padding: 7px 12px;
    background: linear-gradient(180deg, #3a6d1e, #2a5015);
    border: 1px solid #5a9a35;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    text-align: center;
}
.equip-loadout-apply:hover {
    background: linear-gradient(180deg, #4a8028, #357020);
    border-color: #7ab850;
}
.equip-tab-worn {
    flex: 1.3;
}

/* =============================================
   PRAYER TAB (OSRS-style)
   ============================================= */
.prayer-tab {
    background: #3b3024;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.prayer-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    padding: 4px 6px;
    justify-items: center;
    flex: 1;
}

.prayer-cell {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    border: none;
    background: transparent;
    border-radius: 0;
}

.prayer-cell::before {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background: transparent;
    transition: background 0.1s;
}

.prayer-cell:hover:not(.locked)::before {
    background: rgba(200, 180, 120, 0.15);
}

.prayer-cell.active::before {
    background: radial-gradient(ellipse at center, rgba(210, 190, 130, 0.55) 0%, rgba(180, 160, 100, 0.25) 60%, transparent 75%);
}

.prayer-cell.locked {
    opacity: 0.2;
    cursor: default;
    filter: grayscale(100%);
}

.prayer-cell img {
    width: 28px;
    height: 28px;
    image-rendering: pixelated;
    position: relative;
    z-index: 1;
    filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.5));
}

.prayer-cell.active img {
    filter: drop-shadow(0 0 2px rgba(210, 190, 130, 0.6));
}

.prayer-footer {
    padding: 6px 10px;
    font-size: 12px;
    color: var(--white);
    text-shadow: 1px 1px 0 #000;
    text-align: center;
    border-top: 1px solid #2a2018;
    background: #332a1f;
}

.prayer-footer .prayer-pts {
    color: #3ede47;
    font-weight: bold;
}

.prayer-summary {
    padding: 4px 10px;
    font-size: 11px;
    color: #c8a84e;
    background: #332a1f;
    text-shadow: 1px 1px 0 #000;
    text-align: center;
}

/* =============================================
   CHATBOX (OSRS parchment style)
   ============================================= */
.chatbox {
    position: relative;
    height: 240px;
    flex-shrink: 0;
    background: #d1c4a1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 8px solid #494034;
    border-top: 10px solid #3E3529;
    box-shadow: inset 0 0 0 2px #6B5D4F, 0 0 0 3px #000;
}
/* Short desktop screens (e.g. Pixel Fold unfolded ~700px tall) */
@media (min-width: 769px) and (max-height: 800px) {
    .chatbox {
        height: 140px;
        flex-shrink: 1;
    }
}

.chatbox-inner {
    flex: 1;
    overflow-y: auto;
    padding: 6px 12px;
    background: linear-gradient(180deg, #d8cba8, #c9bc99);
    box-shadow: inset 0 4px 8px rgba(0,0,0,0.4);
}

.chatbox-tabs {
    display: flex;
    height: 32px;
    background: #2A2118;
    border-top: 2px solid #000;
    gap: 1px;
    padding: 0 1px;
    flex-shrink: 0;
}

.chatbox-tab {
    padding: 0 14px;
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
    background: linear-gradient(180deg, #6B5D4F 0%, #5A4E40 30%, #494034 70%, #3E3529 100%);
    border: 1px solid #2A2118;
    border-bottom: none;
    border-top: 1px solid #6B5D4F;
    cursor: pointer;
    font-family: 'RS Plain', 'Times New Roman', serif;
    white-space: nowrap;
    text-shadow: 1px 1px 0 #000;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.chatbox-tab:hover {
    background: linear-gradient(180deg, #7B6D5F, #5A4E40, #494034);
}

.chatbox-tab.active {
    background: linear-gradient(180deg, #7B6D5F 0%, #6B5D4F 30%, #5A4E40 100%);
    color: var(--gold);
    border-top: 1px solid #8B7D6F;
}

.chatbox-tab .tab-state {
    font-size: 9px;
    color: #4CAF50;
    display: block;
    line-height: 1;
}

.chat-line {
    padding: 1px 0;
    font-size: 22px;
    font-family: 'RS Plain', 'Times New Roman', serif;
    color: #000;
    line-height: 1.3;
}

.chat-line .log-xp { color: #3F681C; }
.chat-line .log-gold { color: #7F6A00; font-family: 'RS Bold', 'RS Plain', serif; }
.chat-line .log-item { color: #005F00; }
.chat-line .log-bad { color: #FF0000; }
.chat-line .log-level { color: #000080; font-family: 'RS Bold', 'RS Plain', serif; }
.chat-line .log-unique { color: #EF1020; font-weight: 700; }
.chat-line .log-rare { color: #EF1020; font-weight: 700; }

/* =============================================
   COMBAT STYLES TAB (OSRS-style)
   ============================================= */
.combat-tab-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #3b3024;
    border-bottom: 1px solid #000;
}

.combat-tab-wep-icon {
    width: 28px;
    height: 28px;
    image-rendering: pixelated;
}

.combat-tab-head-text {
    display: flex;
    flex-direction: column;
}

.combat-tab-wep-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--gold);
    text-shadow: 1px 1px 0 #000;
}

.combat-tab-combat-lvl {
    font-size: 11px;
    color: var(--gold);
    text-shadow: 1px 1px 0 #000;
}

.combat-tab-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px 40px;
    background: #3b3024;
}

.combat-tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 10px 6px;
    background: #5a5043;
    background-image:
        repeating-linear-gradient(137deg, transparent, transparent 1px, rgba(0,0,0,0.04) 1px, transparent 2px),
        repeating-linear-gradient(31deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, transparent 3px),
        repeating-linear-gradient(82deg, transparent, transparent 1px, rgba(255,255,255,0.02) 1px, transparent 3px),
        repeating-linear-gradient(174deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, transparent 4px);
    border: 1px solid rgba(180, 160, 120, 0.25);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.1s;
    -webkit-mask:
        radial-gradient(circle 5px at 0 0, transparent 98%, black) top left,
        radial-gradient(circle 5px at 100% 0, transparent 98%, black) top right,
        radial-gradient(circle 5px at 0 100%, transparent 98%, black) bottom left,
        radial-gradient(circle 5px at 100% 100%, transparent 98%, black) bottom right;
    -webkit-mask-size: 51% 51%;
    -webkit-mask-repeat: no-repeat;
    mask:
        radial-gradient(circle 5px at 0 0, transparent 98%, black) top left,
        radial-gradient(circle 5px at 100% 0, transparent 98%, black) top right,
        radial-gradient(circle 5px at 0 100%, transparent 98%, black) bottom left,
        radial-gradient(circle 5px at 100% 100%, transparent 98%, black) bottom right;
    mask-size: 51% 51%;
    mask-repeat: no-repeat;
}

.combat-tab-btn:hover {
    background: #6a6053;
}

.combat-tab-btn.active {
    background: #6b2a1a;
    background-image:
        repeating-linear-gradient(137deg, transparent, transparent 1px, rgba(0,0,0,0.04) 1px, transparent 2px),
        repeating-linear-gradient(31deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, transparent 3px),
        repeating-linear-gradient(82deg, transparent, transparent 1px, rgba(255,255,255,0.02) 1px, transparent 3px),
        repeating-linear-gradient(174deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, transparent 4px);
}

.icon-combat-style {
    width: 32px;
    height: 32px;
    image-rendering: pixelated;
}

.cs-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--gold);
    text-shadow: 1px 1px 0 #000;
}

.cs-spell-info {
    font-size: 9px;
    color: #aaa;
    text-shadow: 1px 1px 0 #000;
    line-height: 1.1;
}

.combat-tab-retaliate {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 40px 8px;
    padding: 8px;
    background: #5a5043;
    background-image:
        repeating-linear-gradient(137deg, transparent, transparent 1px, rgba(0,0,0,0.04) 1px, transparent 2px),
        repeating-linear-gradient(31deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, transparent 3px),
        repeating-linear-gradient(82deg, transparent, transparent 1px, rgba(255,255,255,0.02) 1px, transparent 3px),
        repeating-linear-gradient(174deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, transparent 4px);
    border: 1px solid rgba(180, 160, 120, 0.25);
    font-size: 12px;
    font-weight: 700;
    color: var(--gold);
    cursor: pointer;
    font-family: inherit;
    text-shadow: 1px 1px 0 #000;
    text-align: center;
    line-height: 1.3;
    -webkit-mask:
        radial-gradient(circle 5px at 0 0, transparent 98%, black) top left,
        radial-gradient(circle 5px at 100% 0, transparent 98%, black) top right,
        radial-gradient(circle 5px at 0 100%, transparent 98%, black) bottom left,
        radial-gradient(circle 5px at 100% 100%, transparent 98%, black) bottom right;
    -webkit-mask-size: 51% 51%;
    -webkit-mask-repeat: no-repeat;
    mask:
        radial-gradient(circle 5px at 0 0, transparent 98%, black) top left,
        radial-gradient(circle 5px at 100% 0, transparent 98%, black) top right,
        radial-gradient(circle 5px at 0 100%, transparent 98%, black) bottom left,
        radial-gradient(circle 5px at 100% 100%, transparent 98%, black) bottom right;
    mask-size: 51% 51%;
    mask-repeat: no-repeat;
}

.combat-tab-retaliate.active {
    background: #6b2a1a;
    background-image:
        repeating-linear-gradient(137deg, transparent, transparent 1px, rgba(0,0,0,0.04) 1px, transparent 2px),
        repeating-linear-gradient(31deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, transparent 3px),
        repeating-linear-gradient(82deg, transparent, transparent 1px, rgba(255,255,255,0.02) 1px, transparent 3px),
        repeating-linear-gradient(174deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, transparent 4px);
}

.combat-tab-category {
    padding: 6px;
    text-align: center;
    font-size: 11px;
    color: var(--gold);
    background: #3b3024;
    border-top: 1px solid #000;
    text-shadow: 1px 1px 0 #000;
}

/* =============================================
   FLOATING TEXT & LEVEL UP
   ============================================= */
.float-text {
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 14px;
    font-weight: 800;
    pointer-events: none;
    animation: floatUp 0.9s ease-out forwards;
    text-shadow: 1px 1px 0 #000, -1px -1px 0 #000;
    z-index: 20;
}

@keyframes floatUp {
    0% { opacity:1; transform: translateY(0); }
    100% { opacity:0; transform: translateY(-60px); }
}

/* OSRS-style XP drops */
.xp-drop {
    position: absolute;
    top: 280px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 3px;
    pointer-events: none;
    animation: xpDrop 1.5s ease-out forwards;
    z-index: 20;
    white-space: nowrap;
}
.xp-drop-icon {
    width: 22px;
    height: 22px;
    image-rendering: pixelated;
}
.xp-drop-val {
    font-family: 'Runescape Small', 'Runescape UF', Arial, sans-serif;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000;
}

@keyframes xpDrop {
    0%   { opacity: 1; transform: translateY(0); }
    60%  { opacity: 1; }
    100% { opacity: 0; transform: translateY(-230px); }
}

/* OSRS-style level up dialog — overlays the chatbox */
.level-up {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 34px;
    background: linear-gradient(180deg, #d8cba8, #c9bc99);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 20px 30px;
    cursor: pointer;
    animation: lvlFadeIn 0.3s ease-out;
}

.lu-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lu-icon .icon-lu {
    width: 96px;
    height: 96px;
    image-rendering: pixelated;
}

.lu-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lu-line1 {
    color: #000080;
    font-size: 30px;
    font-family: 'RS Quill', 'Times New Roman', serif;
    line-height: 1.3;
}

.lu-line2 {
    color: #000000;
    font-size: 30px;
    font-family: 'RS Quill', 'Times New Roman', serif;
    line-height: 1.3;
}

.lu-continue {
    color: #0000ff;
    font-size: 30px;
    font-family: 'RS Quill', 'Times New Roman', serif;
    line-height: 1.3;
    margin-top: 6px;
}

/* Fireworks on viewport */
.lu-fireworks {
    position: absolute;
    top: 50%; left: 50%;
    z-index: 999;
    pointer-events: none;
}

.lu-spark {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffd700;
    box-shadow: 0 0 4px #ffa500;
    animation: sparkBurst 1s ease-out forwards;
}

.lu-spark:nth-child(3n)   { background: #fff; box-shadow: 0 0 4px #fff; }
.lu-spark:nth-child(3n+1) { background: #ffa500; box-shadow: 0 0 4px #ff8c00; }
.lu-spark:nth-child(5n)   { background: #ff4444; box-shadow: 0 0 4px #ff2200; }

@keyframes sparkBurst {
    0%   { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}

@keyframes lvlFadeIn {
    0%   { opacity: 0; }
    100% { opacity: 1; }
}

/* =============================================
   MONSTER HP BAR
   ============================================= */
.monster-hp-wrap {
    margin-bottom: 8px;
    width: 260px;
}
.monster-hp-top-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}
.monster-hp-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--muted);
    flex: 1;
    text-shadow: 1px 1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000;
}

.monster-hp-bottom-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}
.monster-hp-bottom-row .boss-phase-checks {
    margin-top: 0;
    flex: 1;
}
.superior-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 11px;
    color: #b0a48a;
    margin-left: auto;
    user-select: none;
    -webkit-user-select: none;
}
.superior-toggle:hover {
    color: #d4c8a8;
}
.superior-toggle .osrs-checkbox {
    width: 14px;
    height: 14px;
    margin-left: 0;
}

/* Boss phase checkmarks */
.dps-meter {
    font-size: 11px;
    color: #aaa;
    text-align: right;
    min-height: 14px;
    text-shadow: 1px 1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000;
}
.boss-phase-checks {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 4px;
}
.boss-phase-check {
    width: 28px;
    height: 28px;
    position: relative;
    border: 2px solid #3a342c;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}
.boss-phase-check img {
    width: 22px;
    height: 22px;
    image-rendering: pixelated;
}
.boss-phase-check.active {
    border-color: #FF981F;
    box-shadow: 0 0 4px rgba(255,152,31,0.5);
}
.boss-phase-check.completed {
    border-color: #00cc00;
}
.boss-phase-check .phase-tick {
    position: absolute;
    bottom: -2px;
    right: -2px;
    font-size: 14px;
    color: #00cc00;
    text-shadow: 1px 1px 0 #000, -1px -1px 0 #000;
    font-weight: bold;
    line-height: 1;
}

/* Phase tabs in monster info */
.mi-phase-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 6px;
    border-bottom: 1px solid #1a1610;
    padding-bottom: 4px;
}
.mi-phase-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 6px;
    background: rgba(0,0,0,0.2);
    border: 1px solid #3a342c;
    color: #c0b8a8;
    font-family: 'RS Plain', serif;
    font-size: 12px;
    text-shadow: 1px 1px 0 #000;
    cursor: pointer;
}
.mi-phase-tab img {
    width: 18px;
    height: 18px;
    image-rendering: pixelated;
}
.mi-phase-tab.active {
    background: rgba(255,152,31,0.15);
    border-color: #FF981F;
    color: #FF981F;
}
.mi-phase-tab:hover:not(.active) {
    background: rgba(255,255,255,0.05);
}
.monster-hp-bar {
    height: 22px;
    background: #ff0000;
    overflow: hidden;
    border: 1px solid #000;
}
.monster-hp-fill {
    height: 100%;
    background: #00cc00;
    transition: width 0.15s ease;
}

/* Player HP Bar */
.player-hp-wrap {
    width: 260px;
    margin-top: auto;
    margin-bottom: 12px;
}
.player-hp-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}
.player-hp-label {
    font-size: 12px;
    color: var(--muted);
    text-shadow: 1px 1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000;
}
.player-hp-left {
    display: flex;
    align-items: center;
    gap: 4px;
}
.player-hp-bar {
    height: 18px;
    background: #ff0000;
    overflow: visible;
    border: 1px solid #000;
    position: relative;
}
.player-hitsplat {
    position: absolute !important;
    top: 50% !important;
    transform: translate(-50%, -50%);
    width: 28px !important;
    height: 28px !important;
    font-size: 12px !important;
}
.guthan-heal {
    position: absolute !important;
    top: 50% !important;
    width: auto !important;
    height: auto !important;
    background: none !important;
    color: #00cc00;
    font-size: 14px !important;
    font-weight: bold;
    text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
    animation: guthanFloat 0.8s ease-out forwards;
    pointer-events: none;
    z-index: 25;
}
@keyframes guthanFloat {
    0% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
    30% { transform: translate(-50%, -80%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -120%) scale(0.9); opacity: 0; }
}
.player-hp-fill {
    height: 100%;
    background: #00cc00;
    transition: width 0.15s ease;
}
#fatigue-indicator {
    color: #ff9900;
    font-weight: bold;
    font-size: 11px;
    animation: fatiguePulse 1.5s infinite;
}
@keyframes fatiguePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.fatigued .viewport {
    filter: sepia(0.2) brightness(0.9);
}

/* Player prayer bar */
.player-prayer-row {
    margin-top: 4px;
}
.player-prayer-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}
.player-prayer-label {
    font-size: 12px;
    color: var(--muted);
    text-shadow: 1px 1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000;
}

/* Prayer potion shanks */
.prayer-shanks-wrap {
    position: relative;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.prayer-shanks {
    display: flex;
    justify-content: center;
    gap: 2px;
    padding: 2px 0;
}
.prayer-shank {
    width: 16px;
    height: 16px;
    image-rendering: pixelated;
    transition: opacity 0.3s ease, filter 0.3s ease;
}
.prayer-shank.empty {
    opacity: 0.15;
    filter: brightness(0.4) saturate(0);
}
.prayer-shank.partial {
    filter: brightness(0.7) saturate(0.5);
}
.prayer-shanks.surplus .prayer-shank {
    animation: prayerSurplusGlow 1.8s ease-in-out infinite;
}
.prayer-shanks.surplus .prayer-shank:nth-child(2) { animation-delay: 0.1s; }
.prayer-shanks.surplus .prayer-shank:nth-child(3) { animation-delay: 0.2s; }
.prayer-shanks.surplus .prayer-shank:nth-child(4) { animation-delay: 0.3s; }
.prayer-shanks.surplus .prayer-shank:nth-child(5) { animation-delay: 0.4s; }
.prayer-shanks.surplus .prayer-shank:nth-child(6) { animation-delay: 0.5s; }
.prayer-shanks.surplus .prayer-shank:nth-child(7) { animation-delay: 0.6s; }
.prayer-shanks.surplus .prayer-shank:nth-child(8) { animation-delay: 0.7s; }
.prayer-shanks.surplus .prayer-shank:nth-child(9) { animation-delay: 0.8s; }
.prayer-shanks.surplus .prayer-shank:nth-child(10) { animation-delay: 0.9s; }
@keyframes prayerSurplusGlow {
    0%, 100% { filter: brightness(1) drop-shadow(0 0 0px transparent); }
    50% { filter: brightness(1.4) drop-shadow(0 0 4px #6699ff); }
}

/* Prayer shanks hover tooltip */
.prayer-shanks-tip {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 6px;
    background: var(--panel-bg);
    border: 1px solid #000;
    border-top-color: var(--frame-hi);
    border-left-color: var(--frame-hi);
    padding: 6px 8px;
    z-index: 200;
    white-space: nowrap;
    box-shadow: 2px 3px 8px rgba(0,0,0,0.6);
}
.prayer-shanks-tip-row {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 2px 0;
    font-size: 12px;
    color: var(--white);
    text-shadow: 1px 1px 0 #000;
}
.prayer-shanks-tip-row img {
    width: 18px;
    height: 18px;
    image-rendering: pixelated;
}
.prayer-shanks-tip-qty {
    color: var(--muted);
    margin-left: auto;
    padding-left: 12px;
}
.prayer-shanks-tip-restore {
    color: #6699ff;
    font-size: 11px;
}
.prayer-shanks-tip-total {
    border-top: 1px solid #555;
    margin-top: 4px;
    padding-top: 4px;
    font-size: 11px;
    color: #3366cc;
    text-shadow: 1px 1px 0 #000;
}
.prayer-shanks-tip-empty {
    font-size: 12px;
    color: var(--muted);
    text-shadow: 1px 1px 0 #000;
}
.player-prayer-bar {
    height: 14px;
    background: #1a1a3a;
    overflow: hidden;
    border: 1px solid #000;
}
.player-prayer-fill {
    height: 100%;
    background: #3366cc;
    transition: width 0.15s ease;
}
.active-prayer-icons {
    display: flex;
    gap: 2px;
    margin-top: 3px;
    flex-wrap: wrap;
}
.active-prayer-icons img {
    width: 18px;
    height: 18px;
    image-rendering: pixelated;
    filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.6));
}

/* Supply orbs (mobile circular indicators for food & prayer reserves) */
.supply-orb {
    display: none; /* hidden on desktop — desktop uses shanks */
    position: relative;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.supply-orb-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}
.supply-orb-track {
    stroke: #1a1208;
    opacity: 0.6;
}
.supply-orb-fill {
    transition: stroke-dashoffset 0.3s ease;
    stroke-linecap: round;
}
.food-orb .supply-orb-fill { stroke: #cc8800; }
.prayer-orb .supply-orb-fill { stroke: #3366cc; }
.supply-orb-bg {
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 38%, #3a3025, #1a1208);
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.7);
}
.supply-orb-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    image-rendering: pixelated;
    filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.8));
    z-index: 1;
}
.supply-orb::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid #494034;
    border-top-color: #6B5D4F;
    border-left-color: #5A4E40;
    border-right-color: #3E3529;
    border-bottom-color: #2A2118;
    box-shadow: 0 0 0 1px #000, 0 1px 4px rgba(0,0,0,0.6);
    pointer-events: none;
}
.supply-orb.surplus.food-orb {
    animation: foodOrbGlow 1.8s ease-in-out infinite;
}
.supply-orb.surplus.prayer-orb {
    animation: prayerOrbGlow 1.8s ease-in-out infinite;
}
@keyframes foodOrbGlow {
    0%, 100% { filter: drop-shadow(0 0 0px transparent); }
    50% { filter: drop-shadow(0 0 6px #cc8800) drop-shadow(0 0 2px #ffaa22); }
}
@keyframes prayerOrbGlow {
    0%, 100% { filter: drop-shadow(0 0 0px transparent); }
    50% { filter: drop-shadow(0 0 6px #3366cc) drop-shadow(0 0 2px #6699ff); }
}

/* Supply orb tap tooltip */
.supply-orb-tip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    background: var(--panel-bg);
    border: 1px solid #000;
    border-top-color: var(--frame-hi);
    border-left-color: var(--frame-hi);
    padding: 6px 8px;
    z-index: 200;
    white-space: nowrap;
    box-shadow: 2px 3px 8px rgba(0,0,0,0.6);
}

/* Player food reserve — Minecraft hunger-bar style discrete icons */
.food-shanks-wrap {
    position: relative;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.food-shanks {
    display: flex;
    justify-content: center;
    gap: 2px;
    padding: 2px 0;
}
.food-shank {
    width: 16px;
    height: 16px;
    image-rendering: pixelated;
    transition: opacity 0.3s ease, filter 0.3s ease;
}
.food-shank.empty {
    opacity: 0.15;
    filter: brightness(0.4) saturate(0);
}
.food-shank.partial {
    filter: brightness(0.7) saturate(0.5);
}
.food-shanks.surplus .food-shank {
    animation: shankSurplusGlow 1.8s ease-in-out infinite;
}
.food-shanks.surplus .food-shank:nth-child(2) { animation-delay: 0.1s; }
.food-shanks.surplus .food-shank:nth-child(3) { animation-delay: 0.2s; }
.food-shanks.surplus .food-shank:nth-child(4) { animation-delay: 0.3s; }
.food-shanks.surplus .food-shank:nth-child(5) { animation-delay: 0.4s; }
.food-shanks.surplus .food-shank:nth-child(6) { animation-delay: 0.5s; }
.food-shanks.surplus .food-shank:nth-child(7) { animation-delay: 0.6s; }
.food-shanks.surplus .food-shank:nth-child(8) { animation-delay: 0.7s; }
.food-shanks.surplus .food-shank:nth-child(9) { animation-delay: 0.8s; }
.food-shanks.surplus .food-shank:nth-child(10) { animation-delay: 0.9s; }
@keyframes shankSurplusGlow {
    0%, 100% { filter: brightness(1) drop-shadow(0 0 0px transparent); }
    50% { filter: brightness(1.4) drop-shadow(0 0 4px #ffaa22); }
}

/* Food shanks hover tooltip */
.food-shanks-tip {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 6px;
    background: var(--panel-bg);
    border: 1px solid #000;
    border-top-color: var(--frame-hi);
    border-left-color: var(--frame-hi);
    padding: 6px 8px;
    z-index: 200;
    white-space: nowrap;
    box-shadow: 2px 3px 8px rgba(0,0,0,0.6);
}
.food-shanks-tip-row {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 2px 0;
    font-size: 12px;
    color: var(--white);
    text-shadow: 1px 1px 0 #000;
}
.food-shanks-tip-row img {
    width: 18px;
    height: 18px;
    image-rendering: pixelated;
}
.food-shanks-tip-qty {
    color: var(--muted);
    margin-left: auto;
    padding-left: 12px;
}
.food-shanks-tip-heal {
    color: #00cc00;
    font-size: 11px;
}
.food-shanks-tip-total {
    border-top: 1px solid #555;
    margin-top: 4px;
    padding-top: 4px;
    font-size: 11px;
    color: #cc8800;
    text-shadow: 1px 1px 0 #000;
}
.food-timer {
    font-size: 10px;
    color: #cc8800;
    text-shadow: 1px 1px 0 #000;
    white-space: nowrap;
    line-height: 1;
}
.food-timer-mobile {
    position: absolute;
    bottom: -14px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    color: #cc8800;
    text-shadow: 1px 1px 0 #000;
    white-space: nowrap;
    line-height: 1;
    pointer-events: none;
}
.prayer-timer {
    font-size: 10px;
    color: #cc8800;
    text-shadow: 1px 1px 0 #000;
    white-space: nowrap;
    line-height: 1;
}
.prayer-timer-mobile {
    position: absolute;
    bottom: -14px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    color: #cc8800;
    text-shadow: 1px 1px 0 #000;
    white-space: nowrap;
    line-height: 1;
    pointer-events: none;
}
.food-shanks-tip-empty {
    font-size: 12px;
    color: var(--muted);
    text-shadow: 1px 1px 0 #000;
}


/* =============================================
   HITSPLATS
   ============================================= */
.hitsplat {
    position: fixed;
    width: 48px;
    height: 48px;
    background: url('../img/hitsplats/Red_hitsplat.png') center/contain no-repeat;
    color: white;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    z-index: 20;
    pointer-events: none;
    image-rendering: pixelated;
    text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
    animation: hitsplatPop 0.6s ease-out forwards;
}
.hitsplat.miss {
    background-image: url('../img/hitsplats/Blue_hitsplat.png');
}
.hitsplat.max {
    background-image: url('../img/hitsplats/Max_hitsplat.png');
}
@keyframes hitsplatPop {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
    20% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
    40% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -70%) scale(1); opacity: 0; }
}

/* =============================================
   SCROLLBAR
   ============================================= */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--frame-lo); }
::-webkit-scrollbar-thumb { background: var(--frame); }

/* =============================================
   TOOLTIP (RuneLite-style)
   ============================================= */
.game-tooltip {
    position: fixed;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 11px;
    line-height: 1.4;
    z-index: 10000;
    pointer-events: none;
    white-space: nowrap;
}

.clog-kc-tooltip {
    white-space: normal;
    max-width: 200px;
    max-height: 120px;
    overflow-y: auto;
    pointer-events: auto;
}

.bt-name {
    color: #ff981f;
    font-weight: 700;
}

.bt-price {
    color: #ffff00;
}

.bt-ha {
    color: #cccccc;
}

.bt-compare-divider {
    display: block;
    border-top: 1px solid #444;
    margin: 2px 0;
}

.bt-equip {
    color: #00ff80;
    font-size: 10px;
}

/* =============================================
   CONTEXT MENU (OSRS right-click style)
   ============================================= */
.ctx-menu {
    position: fixed;
    z-index: 10001;
    min-width: 160px;
    background: #3b3024;
    border: 1px solid #000;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.6);
    font-size: 12px;
    font-family: inherit;
}

.ctx-head {
    padding: 4px 8px;
    color: #ff981f;
    font-weight: 700;
    text-shadow: 1px 1px 0 #000;
    background: #2A2118;
    border-bottom: 1px solid #000;
    white-space: nowrap;
}

.ctx-option {
    padding: 4px 8px;
    color: var(--white);
    cursor: pointer;
    white-space: nowrap;
    text-shadow: 1px 1px 0 #000;
}

.ctx-option:hover {
    background: #4a4035;
    color: var(--gold);
}

/* =============================================
   QUEST TAB (OSRS-style quest list)
   ============================================= */
.quest-head {
    padding: 6px 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--gold);
    background: linear-gradient(180deg, #3E3529, #2A2118);
    border-bottom: 1px solid #000;
    text-shadow: 1px 1px 0 #000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quest-head-info {
    font-size: 10px;
    color: var(--muted);
    font-weight: 400;
}

.quest-filters {
    display: flex;
    gap: 0;
    background: #1a1610;
    border-bottom: 1px solid #000;
}

.quest-filter-btn {
    flex: 1;
    padding: 4px 6px;
    font-size: 10px;
    font-weight: 600;
    color: var(--muted);
    background: #2b271f;
    border: none;
    border-right: 1px solid #111;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.1s;
}

.quest-filter-btn:last-child { border-right: none; }
.quest-filter-btn:hover { background: #3b3226; color: var(--white); }
.quest-filter-btn.active {
    background: #4a4035;
    color: var(--gold);
}

.quest-search-wrap {
    padding: 4px 6px;
    background: #2b271f;
    border-bottom: 1px solid #000;
}

.quest-search {
    width: 100%;
    padding: 4px 8px;
    font-size: 11px;
    font-family: inherit;
    background: #1a1610;
    color: var(--white);
    border: 1px solid #494034;
    outline: none;
}

.quest-search:focus {
    border-color: var(--gold-dim);
}

.quest-search::placeholder {
    color: var(--muted);
}

.quest-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #1a1610;
}

.quest-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    background: var(--cell-bg);
    cursor: pointer;
    transition: background 0.1s;
    border-bottom: 1px solid #1a1610;
    font-size: 12px;
}

.quest-row:hover { background: var(--cell-hover); }
.quest-row.completed { opacity: 0.6; }

.quest-status {
    flex-shrink: 0;
    font-size: 10px;
    line-height: 1;
}

.quest-name {
    flex: 1;
    color: var(--white);
    text-shadow: 1px 1px 0 #000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quest-diff {
    flex-shrink: 0;
    font-size: 10px;
}

.quest-empty {
    padding: 20px 10px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
}

/* Quest detail view */
.quest-back-btn {
    display: block;
    width: 100%;
    padding: 6px 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--gold);
    background: linear-gradient(180deg, #3E3529, #2A2118);
    border: none;
    border-bottom: 1px solid #000;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    text-shadow: 1px 1px 0 #000;
}

.quest-back-btn:hover { color: var(--white); }

.quest-detail-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: var(--cell-bg);
    border-bottom: 1px solid #1a1610;
}

.quest-detail-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--gold);
    text-shadow: 1px 1px 0 #000;
}

.quest-detail-diff {
    font-size: 11px;
    text-shadow: 1px 1px 0 #000;
}

.quest-detail-status {
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    text-shadow: 1px 1px 0 #000;
}

.quest-detail-status.complete {
    background: #1a3a1a;
    color: #00ff00;
    border-bottom: 1px solid #000;
}

.quest-detail-status.available {
    background: #3a3a1a;
    color: #ffff00;
    border-bottom: 1px solid #000;
}

.quest-detail-status.locked {
    background: #3a1a1a;
    color: #ff4444;
    border-bottom: 1px solid #000;
}

.quest-detail-section {
    padding: 8px 10px;
    background: var(--cell-bg);
    border-bottom: 1px solid #1a1610;
}

.quest-section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--gold);
    text-shadow: 1px 1px 0 #000;
    margin-bottom: 6px;
}

.quest-req {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
    font-size: 12px;
}

.quest-req.met { color: var(--green); }
.quest-req.unmet { color: var(--red); }

.quest-req-icon {
    width: 18px;
    height: 18px;
    image-rendering: pixelated;
}

.quest-req-lvl {
    margin-left: auto;
    font-size: 10px;
    color: var(--muted);
}

.quest-reward {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
    font-size: 12px;
    color: var(--white);
}

.quest-complete-wrap {
    padding: 10px;
    background: var(--cell-bg);
}

.quest-complete-btn {
    width: 100%;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    color: var(--white);
    background: linear-gradient(180deg, #2D7A2D, #1A4A1A);
    border: 1px solid #000;
    box-shadow: inset 1px 1px 0 #4A9A4A, inset -1px -1px 0 #0A2A0A;
    cursor: pointer;
    text-shadow: 1px 1px 0 #000;
}

.quest-complete-btn:hover {
    background: linear-gradient(180deg, #3A8A3A, #2D6A2D);
}

.quest-complete-btn:active {
    box-shadow: inset -1px -1px 0 #4A9A4A, inset 1px 1px 0 #0A2A0A;
}

.quest-complete-btn.disabled {
    background: linear-gradient(180deg, #4a4035, #2b271f);
    color: var(--muted);
    cursor: not-allowed;
    box-shadow: none;
}

/* Quest timer — cancel button */
.quest-cancel-btn {
    background: linear-gradient(180deg, #8A3A3A, #6A2D2D) !important;
    color: #ffcccc !important;
}
.quest-cancel-btn:hover {
    background: linear-gradient(180deg, #9A4A4A, #7A3D3D) !important;
}

/* Quest detail — in-progress status */
.quest-detail-status.in-progress {
    background: #1a2a3a;
    color: #00ccff;
}

/* Quest detail — timer display */
.quest-detail-timer {
    text-align: center;
    color: #00ccff;
    font-size: 13px;
    padding: 8px 0;
    text-shadow: 1px 1px 0 #000;
}
.quest-timer-bar-detail {
    width: 100%;
    height: 6px;
    background: #1a1a1a;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}
.quest-timer-fill-detail {
    height: 100%;
    background: linear-gradient(90deg, #00aacc, #00ccff);
    transition: width 1s linear;
}

/* Quest list — in-progress row */
.quest-row.in-progress {
    border-left: 2px solid #00ccff;
}
.quest-row-timer {
    font-size: 10px;
    color: #00ccff;
    margin-left: auto;
    text-shadow: 1px 1px 0 #000;
}

/* Quest timer — viewport overlay */
.quest-timer-display {
    position: absolute;
    bottom: 10px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #5a5a44;
    border-radius: 3px;
    padding: 5px 10px;
    z-index: 5;
}
.quest-timer-icon {
    width: 20px;
    height: 20px;
    image-rendering: pixelated;
}
.quest-timer-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.quest-timer-name {
    font-size: 11px;
    font-weight: 700;
    text-shadow: 1px 1px 0 #000;
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.quest-timer-bar {
    width: 110px;
    height: 4px;
    background: #1a1a1a;
    border-radius: 2px;
    overflow: hidden;
}
.quest-timer-fill {
    height: 100%;
    background: linear-gradient(90deg, #00aacc, #00ccff);
    transition: width 1s linear;
}
.quest-timer-time {
    font-size: 10px;
    color: #cccccc;
    text-shadow: 1px 1px 0 #000;
}

/* =============================================
   MOBILE NAV (hidden on desktop)
   ============================================= */
.mobile-nav {
    display: none;
}

/* =============================================
   MOBILE LAYOUT
   ============================================= */
@media (max-width: 768px) {
    /* --- GAME SHELL --- */
    html, body {
        overflow: hidden;
        height: 100%;
    }

    .game {
        height: 100vh;
        height: 100dvh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    /* --- TOP BAR --- */
    .topbar {
        height: 36px;
        padding: 0 6px;
        gap: 4px;
        flex-shrink: 0;
        position: sticky;
        top: 0;
        z-index: 100;
        overflow: hidden;
    }

    .topbar-title {
        font-size: 12px;
        letter-spacing: 0;
    }

    .topbar-alpha {
        font-size: 7px;
        padding: 0 3px;
    }

    .topbar-roadmap {
        font-size: 9px;
        padding: 2px 4px;
    }

    .global-search-wrap {
        min-width: 70px;
        max-width: 100px;
    }
    .global-search-input {
        font-size: 11px;
        height: 24px;
        padding: 2px 6px;
    }
    .global-search-dropdown {
        position: fixed;
        top: 36px;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 60vh;
        border-radius: 0;
    }

    .topbar-char-btn {
        font-size: 11px;
        padding: 2px 4px;
        gap: 2px;
    }

    .topbar-char-btn .stat-val {
        display: none;
    }

    .topbar-stats {
        gap: 4px;
        font-size: 10px;
    }

    .topbar-stat {
        white-space: nowrap;
    }

    /* --- GAME BODY: stack vertically --- */
    .game-body {
        flex-direction: column;
        flex: 1;
        min-height: 0;
        overflow: hidden;
    }

    /* --- LEFT COLUMN: just the viewport, no flex grow --- */
    .left-col {
        flex: none;
        min-height: 0;
    }

    /* --- VIEWPORT: compact --- */
    .viewport {
        padding: 4px 8px;
        min-height: 0;
        flex: none;
    }

    .vp-center {
        gap: 2px;
    }

    .action-icon-wrap {
        width: 100px;
        height: 100px;
        border-width: 2px;
    }

    .action-icon .icon-action {
        width: 56px;
        height: 56px;
    }

    .action-icon.monster .icon-action {
        width: 80px;
        height: 80px;
    }

    .partyhat-overlay {
        top: -22px;
        width: 32px;
        height: 32px;
        transform: translateX(-60%) rotate(-20deg);
    }

    .quest-timer-display {
        bottom: 6px;
        right: 6px;
        padding: 3px 6px;
        gap: 4px;
    }
    .quest-timer-icon { width: 16px; height: 16px; }
    .quest-timer-name { font-size: 10px; max-width: 100px; }
    .quest-timer-bar { width: 80px; height: 3px; }
    .quest-timer-time { font-size: 9px; }

    .action-skill-name { font-size: 12px; }
    .action-method-name { font-size: 11px; margin-top: 0; }
    .action-xp { font-size: 10px; margin-top: 1px; }
    .action-cost { font-size: 9px; margin-top: 1px; }
    .weapon-display { font-size: 10px; margin-top: 2px; }
    .weapon-ammo-timer { font-size: 9px; }

    .action-status {
        top: 4px;
        left: 6px;
        font-size: 9px;
    }

    .monster-hp-wrap {
        width: 160px;
        margin-bottom: 2px;
    }
    .player-hp-wrap {
        width: 200px;
        margin-top: auto;
        margin-bottom: 8px;
    }

    /* Mobile: hide shanks, show supply orbs */
    .food-shanks-wrap,
    .prayer-shanks-wrap {
        display: none !important;
    }
    .supply-orb {
        display: flex;
        margin-right: 4px;
    }
    .bar-with-orb {
        display: flex;
        align-items: center;
    }
    .bar-with-orb .player-hp-bar,
    .bar-with-orb .player-prayer-bar {
        flex: 1;
    }

    .xp-bar-wrap {
        max-width: 180px;
        margin-top: 1px;
    }

    /* Floating XP bar — thin strip above the tick bar on mobile
       Uses !important because the base #xp-bar-float rule appears later in the file */
    #xp-bar-float {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        gap: 0 !important;
        padding: 0 !important;
        background: none !important;
        border: none !important;
        border-radius: 0 !important;
        max-width: none !important;
        width: 100% !important;
        z-index: 11 !important;
        align-items: stretch !important;
    }

    .xpb-icon {
        display: none !important;
    }

    .xpb-labels {
        display: none !important;
    }

    .xpb-info {
        width: 100% !important;
        gap: 0 !important;
    }

    .xpb-track {
        height: 3px !important;
        border: none !important;
        border-radius: 0 !important;
        background: rgba(0,0,0,0.3) !important;
    }

    /* Push the tick bar down to sit below the XP bar */
    .action-progress {
        top: 3px;
    }

    .shop-orbs {
        bottom: 4px;
        right: 4px;
        gap: 3px;
        flex-direction: row;
        flex-wrap: wrap-reverse;
        justify-content: flex-end;
        width: 62px;
    }

    .shop-orb {
        width: 28px;
        height: 28px;
        border-width: 2px;
    }

    .shop-orb img {
        width: 16px;
        height: 16px;
    }

    #xp-tracker-btn {
        width: 28px;
        height: 28px;
        border-width: 2px;
    }


    /* --- CHATBOX: hidden on mobile --- */
    .chatbox {
        display: none !important;
    }

    /* --- ALL MODALS: use fixed positioning on mobile so they cover full screen --- */
    .settings-overlay,
    .shop-modal-overlay,
    .charselect-overlay,
    .clue-overlay,
    .autocast-picker-overlay {
        position: fixed !important;
        inset: 0;
        z-index: 200;
    }

    /* --- SHOP MODAL --- */
    .shop-modal-panel {
        width: 95%;
        max-width: none;
        max-height: 80vh;
        padding: 4px;
    }

    .shop-modal-inner {
        max-height: calc(80vh - 10px);
    }

    .shop-modal-close {
        width: 32px;
        height: 32px;
        font-size: 18px;
        right: 4px;
        top: 2px;
    }

    .shop-modal-body .bank-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .shop-modal-body .armoury-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-auto-flow: row;
    }

    /* --- SETTINGS PANEL --- */
    .settings-panel {
        max-height: 80vh;
        overflow-y: auto;
    }

    .settings-close {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }

    /* --- CLUE SCROLL PANEL --- */
    .clue-scroll-panel {
        width: 90%;
        max-width: 280px;
        max-height: 75vh;
    }

    .clue-close-x {
        width: 32px;
        height: 32px;
        font-size: 18px;
        line-height: 32px;
    }

    /* --- AUTOCAST PICKER --- */
    .autocast-picker {
        max-height: 75vh;
        overflow-y: auto;
    }

    /* --- MONSTER INFO --- */
    .monster-info-panel-left {
        position: fixed;
        left: 4px;
        top: 40px;
        max-width: calc(100vw - 8px);
        min-width: 0;
        max-height: 70vh;
        overflow-y: auto;
        z-index: 201;
    }

    /* --- SIDEBAR: full width, fills remaining space --- */
    .sidebar {
        width: 100%;
        flex: 1;
        flex-shrink: 1;
        min-height: 0;
        border: none;
        border-top: 2px solid #000;
    }

    .sidebar::before,
    .sidebar::after {
        display: none;
    }

    .sidebar-inner {
        min-height: 0;
        overflow: hidden;
    }

    /* --- DESKTOP BOTTOM TABS: replaced by mobile nav --- */
    .sidebar-tabs {
        display: none !important;
    }

    .sidebar-splitter {
        display: none !important;
    }

    /* --- SIDEBAR UPPER (methods/bosses/shop panels) --- */
    .sidebar-upper {
        flex: 1;
        min-height: 0;
        overflow: hidden;
    }

    .sidebar-body {
        flex: 1;
        overflow-y: auto;
        min-height: 0;
    }

    /* --- SIDEBAR SKILLS (bottom tab content: skills/bank/equip/quests) --- */
    .sidebar-skills {
        border-top: none;
        margin-top: 0;
        overflow-y: auto;
        flex: 1;
        min-height: 0;
    }

    /* --- MOBILE TAB VISIBILITY --- */
    /* Skills tab: hide upper, show lower */
    .game.mobile-tab-skills .sidebar-upper { display: none; }
    .game.mobile-tab-skills .sidebar-skills { display: block; flex: 1; }

    /* Methods tab: show upper, hide lower */
    .game.mobile-tab-methods .sidebar-upper { display: flex; flex: 1; }
    .game.mobile-tab-methods .sidebar-skills { display: none; }

    /* Bank tab: hide upper, show lower */
    .game.mobile-tab-bank .sidebar-upper { display: none; }
    .game.mobile-tab-bank .sidebar-skills { display: block; flex: 1; }

    /* Equip tab: hide upper, show lower */
    .game.mobile-tab-equip .sidebar-upper { display: none; }
    .game.mobile-tab-equip .sidebar-skills { display: block; flex: 1; }

    /* Quests tab: hide upper, show lower */
    .game.mobile-tab-quests .sidebar-upper { display: none; }
    .game.mobile-tab-quests .sidebar-skills { display: block; flex: 1; }

    /* Prayer tab: hide upper, show lower */
    .game.mobile-tab-prayer .sidebar-upper { display: none; }
    .game.mobile-tab-prayer .sidebar-skills { display: block; flex: 1; }

    /* --- MOBILE BOTTOM NAV --- */
    .mobile-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 52px;
        background: linear-gradient(180deg, #5A4E40, #3E3529);
        border-top: 2px solid #000;
        box-shadow: 0 -2px 8px rgba(0,0,0,0.5);
        z-index: 1000;
        padding: 0;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        gap: 0;
        flex-shrink: 0;
    }

    .mobile-nav-btn {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        background: none;
        border: none;
        color: var(--muted);
        font-size: 9px;
        font-family: inherit;
        cursor: pointer;
        padding: 4px 2px;
        -webkit-tap-highlight-color: transparent;
        transition: color 0.15s, background 0.15s;
    }

    .mobile-nav-btn.active {
        color: var(--gold);
        background: rgba(255, 215, 0, 0.08);
    }

    .mobile-nav-btn img {
        width: 22px;
        height: 22px;
        image-rendering: pixelated;
        filter: drop-shadow(1px 1px 0 rgba(0,0,0,0.5));
    }

    .mobile-nav-label {
        font-size: 9px;
        line-height: 1;
        text-shadow: 1px 1px 0 #000;
    }

    /* Space for fixed bottom nav */
    .game {
        padding-bottom: 52px;
        padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px));
    }

    /* XP tracker above mobile nav */
    #xp-tracker-btn {
        z-index: 1001;
        bottom: calc(60px + env(safe-area-inset-bottom, 0px));
    }
    #xp-tracker-panel {
        z-index: 1001;
        bottom: calc(116px + env(safe-area-inset-bottom, 0px));
    }

    /* --- SKILL GRID: tighter for mobile --- */
    .skill-grid {
        gap: 2px;
        padding: 2px;
    }

    .skill-cell {
        padding: 3px 3px 3px 4px;
    }

    /* --- BANK GRID: 5 columns on mobile --- */
    .bank-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    /* --- EQUIPMENT: slightly tighter --- */
    .equip-grid {
        padding: 10px 16px;
    }

    .eq-slot {
        width: 48px;
        height: 48px;
    }

    /* --- PRAYER: 5 columns on mobile too --- */
    .prayer-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    /* --- COMBAT STYLES: tighter padding --- */
    .combat-tab-grid {
        padding: 8px 16px;
        gap: 8px;
    }

    .combat-tab-retaliate {
        margin: 0 16px 6px;
    }

    /* --- TOOLTIP: hidden on touch devices unless long-press activated --- */
    .game-tooltip:not(.mobile-active) {
        display: none !important;
    }

    /* --- CONTEXT MENU: fit mobile screen --- */
    .ctx-menu {
        max-width: 90vw;
    }

    /* --- METHOD LIST: tighter --- */
    .method-row {
        padding: 6px 8px;
    }

    /* --- TOP TABS: smaller on mobile --- */
    .sidebar-top-tab img {
        width: 20px;
        height: 20px;
    }

    /* --- LEVEL UP POPUP: scale down --- */
    .level-up {
        padding: 10px 12px;
        gap: 10px;
        bottom: 0;
    }

    .lu-icon .icon-lu {
        width: 48px;
        height: 48px;
    }

    .lu-line1, .lu-line2, .lu-continue {
        font-size: 16px;
    }

    /* --- XP DROPS & FLOAT TEXT: adjust for compact viewport --- */
    .xp-drop {
        top: 30px;
        right: 6px;
    }

    .xp-drop-val {
        font-size: 14px;
    }

    .xp-drop-icon {
        width: 16px;
        height: 16px;
    }

    .float-text {
        font-size: 12px;
        top: 4px;
        right: 6px;
    }

    /* --- MOBILE COMBAT HEADER (collapsible in Methods tab) --- */
    .mobile-combat-header {
        cursor: pointer;
        padding: 6px 10px;
        background: #3b3024;
        border-bottom: 1px solid #000;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .mobile-combat-header:active {
        background: #4a4035;
    }

    .mcb-icon {
        width: 24px;
        height: 24px;
        image-rendering: pixelated;
    }

    .mcb-style {
        flex: 1;
        font-size: 12px;
        color: var(--gold);
        font-weight: 700;
        text-shadow: 1px 1px 0 #000;
    }

    .mcb-level {
        font-size: 10px;
        color: var(--muted);
        text-shadow: 1px 1px 0 #000;
    }
}

/* =============================================
   XP TRACKER
   ============================================= */
#xp-tracker-btn {
    position: absolute;
    bottom: 8px;
    left: 8px;
    z-index: 20;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cell-bg);
    border: 4px solid #494034;
    border-top-color: #6B5D4F;
    border-left-color: #5A4E40;
    border-right-color: #3E3529;
    border-bottom-color: #2A2118;
    box-shadow:
        0 0 0 1px #000,
        inset 0 0 6px rgba(0,0,0,0.5),
        0 2px 6px rgba(0,0,0,0.6);
    cursor: pointer;
    border-radius: 50%;
    padding: 0;
    opacity: 0.85;
    transition: opacity 0.15s;
}
#xp-tracker-btn:hover { opacity: 1; }
#xp-tracker-btn:active {
    opacity: 1;
    border-top-color: #3E3529;
    border-left-color: #2A2118;
    border-right-color: #5A4E40;
    border-bottom-color: #6B5D4F;
}
.xpt-btn-icon {
    width: 28px;
    height: 28px;
    image-rendering: pixelated;
    filter: drop-shadow(1px 1px 0 rgba(0,0,0,0.6));
}

#xp-tracker-panel {
    position: absolute;
    bottom: 64px;
    left: 8px;
    z-index: 20;
    width: 280px;
    background: #1a1610;
    border: 2px solid #000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.6);
    max-height: 60vh;
    overflow-y: auto;
}

.xpt-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    background: linear-gradient(180deg, #3E3529, #2A2118);
    border-bottom: 1px solid #000;
    font-size: 12px;
    font-weight: 700;
    color: var(--gold);
    text-shadow: 1px 1px 0 #000;
}

.xpt-reset-all {
    background: linear-gradient(180deg, #6B3030, #3E2020);
    border: 1px solid #000;
    box-shadow: inset 1px 1px 0 #8B4040, inset -1px -1px 0 #2A1414;
    color: var(--white);
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.xpt-empty {
    padding: 16px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
}

.xpt-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 3px;
}

.xpt-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 6px;
    background: #5a5043;
    background-image:
        repeating-linear-gradient(137deg, transparent, transparent 1px, rgba(0,0,0,0.04) 1px, transparent 2px),
        repeating-linear-gradient(31deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, transparent 3px),
        repeating-linear-gradient(82deg, transparent, transparent 1px, rgba(255,255,255,0.02) 1px, transparent 3px),
        repeating-linear-gradient(174deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, transparent 4px);
    border: 1px solid rgba(180, 160, 120, 0.25);
    -webkit-mask:
        radial-gradient(circle 4px at 0 0, transparent 98%, black) top left,
        radial-gradient(circle 4px at 100% 0, transparent 98%, black) top right,
        radial-gradient(circle 4px at 0 100%, transparent 98%, black) bottom left,
        radial-gradient(circle 4px at 100% 100%, transparent 98%, black) bottom right;
    -webkit-mask-size: 51% 51%;
    -webkit-mask-repeat: no-repeat;
    mask:
        radial-gradient(circle 4px at 0 0, transparent 98%, black) top left,
        radial-gradient(circle 4px at 100% 0, transparent 98%, black) top right,
        radial-gradient(circle 4px at 0 100%, transparent 98%, black) bottom left,
        radial-gradient(circle 4px at 100% 100%, transparent 98%, black) bottom right;
    mask-size: 51% 51%;
    mask-repeat: no-repeat;
}

.xpt-icon {
    width: 20px;
    height: 20px;
    image-rendering: pixelated;
    flex-shrink: 0;
}

.xpt-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.xpt-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--white);
    text-shadow: 1px 1px 0 #000;
}

.xpt-detail {
    font-size: 10px;
    color: var(--muted);
}

.xpt-rate {
    color: var(--gold);
}

.xpt-remaining {
    font-size: 10px;
    color: #8b8b8b;
}

.xpt-canvas-label {
    flex-shrink: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.xpt-canvas-label input {
    cursor: pointer;
    accent-color: var(--gold);
}

.xpt-reset {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    font-family: inherit;
}
.xpt-reset:hover { color: #ff4444; }

.xpt-click-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 6px;
    margin: 3px;
    background: #4a4538;
    border: 1px solid rgba(180, 160, 120, 0.25);
    border-radius: 3px;
}

/* Canvas overlays (persistent on viewport) */
#xp-canvas-overlays {
    position: absolute;
    bottom: 8px;
    right: 10px;
    z-index: 15;
    display: flex;
    flex-direction: column;
    gap: 4px;
    pointer-events: none;
    align-items: flex-end;
}

.xp-canvas-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px 3px 4px;
    background: rgba(26, 22, 16, 0.8);
    border: 1px solid rgba(180, 160, 120, 0.2);
    border-radius: 3px;
}

.xp-canvas-icon {
    width: 18px;
    height: 18px;
    image-rendering: pixelated;
}

.xp-canvas-gained {
    font-size: 12px;
    color: var(--white);
    text-shadow: 1px 1px 0 #000;
}

.xp-canvas-rate {
    font-size: 13px;
    font-weight: 700;
    color: var(--gold);
    text-shadow: 1px 1px 0 #000;
}

/* =============================================
   FLOATING XP BAR (RuneLite-style)
   ============================================= */
#xp-bar-float {
    position: absolute;
    top: 6px;
    right: 8px;
    z-index: 18;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(26, 22, 16, 0.92);
    border: 1px solid rgba(180, 160, 120, 0.3);
    border-radius: 3px;
    transition: opacity 0.6s;
}

#xp-bar-float.xp-bar-fadeout {
    opacity: 0;
}

.xpb-icon {
    width: 28px;
    height: 28px;
    image-rendering: pixelated;
    flex-shrink: 0;
    filter: drop-shadow(1px 1px 0 rgba(0,0,0,0.6));
}

.xpb-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 180px;
}

.xpb-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
}

.xpb-labels #xpb-name {
    color: var(--white);
    font-weight: 700;
    text-shadow: 1px 1px 0 #000;
}

.xpb-labels #xpb-xp {
    color: var(--muted);
    text-shadow: 1px 1px 0 #000;
}

.xpb-track {
    height: 8px;
    background: #111;
    border: 1px solid rgba(180, 160, 120, 0.2);
    overflow: hidden;
    border-radius: 1px;
}

.xpb-fill {
    height: 100%;
    background: linear-gradient(180deg, #55DD55, #00AA00, #008800);
    transition: width 0.3s;
}

/* === LOOT CHEST (OSRS Barrows-style) === */
.clue-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.clue-scroll-panel {
    background: #494034;
    border: 3px solid #000;
    box-shadow:
        inset 0 0 0 1px #6B5D4F,
        inset 0 0 0 2px #3E3529,
        0 8px 32px rgba(0,0,0,0.7);
    width: 262px;
    max-height: 80vh;
    overflow-y: auto;
    animation: popIn 0.25s ease-out;
    position: relative;
}
@keyframes popIn { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Header bar */
.clue-scroll-header {
    text-align: center;
    font-weight: 700;
    color: #ff981f;
    font-size: 13px;
    padding: 6px 28px 6px 8px;
    background: linear-gradient(180deg, #5A4E40, #494034);
    border-bottom: 2px solid #000;
    text-shadow: 1px 1px 0 #000;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

/* Close X button */
.clue-close-x {
    position: absolute;
    top: 2px;
    right: 4px;
    width: 22px;
    height: 22px;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--white);
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    line-height: 22px;
    text-align: center;
    text-shadow: 1px 1px 0 #000;
    opacity: 0.6;
    transition: opacity 0.15s;
}
.clue-close-x:hover { opacity: 1; color: #ff4444; }

/* Sell All button */
.clue-sell-all {
    display: block;
    margin: 6px auto;
    padding: 4px 14px;
    background: linear-gradient(180deg, #5a4d3a, #3e3529);
    border: 1px solid #6B5D4F;
    border-radius: 3px;
    color: #ffd700;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-shadow: 1px 1px 0 #000;
}
.clue-sell-all:hover {
    background: linear-gradient(180deg, #6a5d4a, #4e4539);
    border-color: #8a7a6a;
}

/* Item grid — OSRS inventory style 4 columns */
.clue-scroll-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    padding: 4px;
    background: #1a1610;
}

/* Each loot slot */
.clue-reward-item {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #3b3226;
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border: 1px solid #2a2218;
}
.clue-reward-item:hover {
    background: #4a4030;
    border-color: #6B5D4F;
}

/* Quantity overlay (top-left, OSRS-style) */
.clue-reward-item .bi-qty {
    position: absolute;
    top: 1px;
    left: 2px;
    font-size: 10px;
    font-weight: 700;
    color: #ffff00;
    text-shadow: 1px 1px 0 #000, -1px 0 0 #000, 0 -1px 0 #000;
    z-index: 2;
}

/* Item name tooltip (hidden by default, show on hover) */
.clue-item-name {
    display: none;
}

/* Footer value bar */
.clue-scroll-value {
    text-align: center;
    font-size: 11px;
    padding: 5px 8px;
    background: linear-gradient(180deg, #494034, #3E3529);
    border-top: 2px solid #000;
    color: var(--muted);
    text-shadow: 1px 1px 0 #000;
}

/* Hide old OK button — use X instead */
.clue-scroll-close {
    display: none;
}

/* Item name tooltip on hover */
.clue-reward-item .clue-item-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a1610;
    border: 1px solid #6B5D4F;
    padding: 3px 6px;
    font-size: 10px;
    color: #ff981f;
    white-space: nowrap;
    text-shadow: 1px 1px 0 #000;
    z-index: 10;
    pointer-events: none;
}
.clue-reward-item:hover .clue-item-tooltip { display: block; }

/* Bank clue scroll highlight */
.bank-item.clue-scroll {
    border: 1px solid #ff981f;
    cursor: pointer;
}

/* Scurrius' spine choice menu */
.spine-choices {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    padding: 0 4px;
}
.spine-choice {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: var(--cell-bg);
    border: 1px solid #1a1610;
    cursor: pointer;
    transition: background 0.15s;
}
.spine-choice:hover {
    background: var(--cell-active);
    border-color: var(--gold-dim);
}
.spine-choice-info {
    display: flex;
    flex-direction: column;
    font-size: 11px;
    color: var(--white);
    text-shadow: 1px 1px 0 #000;
}
.spine-choice-xp {
    font-size: 10px;
    color: #4CAF50;
}

/* === AUTOCAST PICKER MODAL === */
.autocast-picker-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
}
.autocast-picker {
    background: #3b3024;
    border: 2px solid #5c513a;
    border-radius: 4px;
    padding: 12px;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    position: relative;
}
.autocast-picker-title {
    color: #FF981F;
    font-family: 'RS_Bold', sans-serif;
    font-size: 14px;
    text-align: center;
    margin-bottom: 10px;
    text-shadow: 1px 1px 0 #000;
}
.autocast-picker-close {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    color: var(--red);
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    line-height: 24px;
    text-align: center;
}
.autocast-spell-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}
.autocast-spell-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2b2218;
    border: 1px solid #5c513a;
    border-radius: 3px;
    padding: 6px;
    cursor: pointer;
    transition: background 0.15s;
}
.autocast-spell-btn:hover {
    background: #4a3f30;
}
.autocast-spell-btn.active {
    background: #6b2a1a;
    border-color: #FF981F;
}
.autocast-spell-btn.locked {
    opacity: 0.3;
    filter: grayscale(100%);
    cursor: default;
}
.autocast-spell-btn .icon-spell {
    width: 28px;
    height: 28px;
    image-rendering: pixelated;
}

/* Weapon mismatch picker */
.weapon-picker-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 300px;
    overflow-y: auto;
}
.weapon-picker-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #2b2218;
    border: 1px solid #5c513a;
    border-radius: 3px;
    padding: 6px 10px;
    cursor: pointer;
    transition: background 0.15s;
    text-align: left;
    width: 100%;
}
.weapon-picker-btn:hover {
    background: #4a3f30;
    border-color: #FF981F;
}
.weapon-picker-name {
    color: #FF981F;
    font-family: 'RS_Bold', sans-serif;
    font-size: 12px;
    text-shadow: 1px 1px 0 #000;
}

/* Autocast info panel in combat tab */
.autocast-info-panel {
    grid-column: 1 / -1;
    background: #2b2218;
    border: 1px solid #5c513a;
    border-radius: 3px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--white);
    text-shadow: 1px 1px 0 #000;
}
.autocast-info-panel .ac-element {
    font-size: 10px;
    text-transform: capitalize;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: bold;
}
.ac-element-air   { background: #4a6a8a; color: #cde; }
.ac-element-water { background: #2a4a7a; color: #9cf; }
.ac-element-earth { background: #5a4a2a; color: #dc9; }
.ac-element-fire  { background: #7a2a1a; color: #fca; }

/* Autocast combat tab button styling */
.combat-tab-btn.autocast-btn {
    border: 1px dashed #5c513a;
}
.combat-tab-btn.autocast-btn.active {
    border: 1px solid #FF981F;
    background: #3a1a5a;
    background-image: none;
}

/* === SPELLBOOK VISUAL GUIDE === */
.spellbook-section-label {
    color: #FF981F;
    font-family: 'RS_Bold', sans-serif;
    font-size: 12px;
    padding: 8px 10px 4px;
    text-shadow: 1px 1px 0 #000;
}
.spellbook-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 4px 10px 10px;
}
.spellbook-spell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.15s;
}
.spellbook-spell:hover {
    background: rgba(255,255,255,0.08);
}
.spellbook-spell.locked {
    opacity: 0.25;
    filter: grayscale(100%);
}
.spellbook-spell .icon-spell {
    width: 24px;
    height: 24px;
    image-rendering: pixelated;
}

/* Spell tooltip */
.spell-tooltip {
    position: absolute;
    background: #2b2218;
    border: 1px solid #5c513a;
    border-radius: 4px;
    padding: 8px 10px;
    z-index: 9999;
    font-size: 11px;
    color: var(--white);
    text-shadow: 1px 1px 0 #000;
    pointer-events: none;
    max-width: 200px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.spell-tooltip .st-name {
    color: #FF981F;
    font-family: 'RS_Bold', sans-serif;
    font-size: 12px;
}
.spell-tooltip .st-info {
    color: #aaa;
    margin-top: 2px;
}

/* === METHOD LIST SUBHEADER === */
.method-list-subhead {
    color: #FF981F;
    font-family: 'RS_Bold', sans-serif;
    font-size: 11px;
    padding: 8px 10px 4px;
    text-shadow: 1px 1px 0 #000;
    border-top: 1px solid #5c513a;
}

/* === IRON MAN MODE === */
.chat-ironman-badge {
    width: 11px;
    height: 11px;
    image-rendering: pixelated;
    vertical-align: middle;
    margin-right: 3px;
}
.shop-orb.ironman-disabled {
    opacity: 0.35;
    filter: grayscale(0.8);
}
.shop-item.ironman-locked {
    opacity: 0.3;
    pointer-events: none;
    filter: grayscale(0.6);
}
.shop-ironman-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #3a2a1a 0%, #2a1a0a 100%);
    border: 1px solid #7a6a4a;
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 8px;
    color: #ccc;
    font-size: 12px;
    text-shadow: 1px 1px 0 #000;
}
.shop-ironman-banner small {
    color: #ff8844;
    font-style: italic;
}
.ironman-banner-icon {
    width: 20px;
    height: 20px;
    image-rendering: pixelated;
    flex-shrink: 0;
}

/* Character creation ironman toggle */
.charslot-ironman-row {
    flex-direction: column;
    gap: 4px;
}
.charslot-ironman-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 6px 10px;
    border: 1px solid #5c513a;
    border-radius: 4px;
    background: rgba(0,0,0,0.3);
    user-select: none;
}
.charslot-ironman-toggle:hover {
    border-color: #7a6a4a;
    background: rgba(0,0,0,0.4);
}
.charslot-ironman-icon {
    width: 16px;
    height: 16px;
    image-rendering: pixelated;
}
.charslot-ironman-toggle span {
    color: #ccc;
    font-size: 12px;
    flex: 1;
}
.charslot-ironman-check {
    width: 14px;
    height: 14px;
    border: 1px solid #5c513a;
    border-radius: 2px;
    background: #1a1a1a;
}
.charslot-ironman-check.checked {
    background: #3a7a3a;
    border-color: #5a9a5a;
    box-shadow: inset 0 0 4px rgba(100,200,100,0.4);
}
.charslot-ironman-check.checked::after {
    content: '';
    display: block;
    width: 4px;
    height: 8px;
    margin: 1px auto 0;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.charslot-ironman-warn {
    padding: 4px 10px;
    color: #ff8844;
    font-style: italic;
    line-height: 1.4;
}

/* Mode select & badges */
.charslot-customize {
    background: linear-gradient(180deg, #5a4e40 0%, #3E3529 60%, #2A2118 100%) !important;
    color: #FF981F !important;
    border-color: #1a1610 !important;
    width: 100%;
    padding: 6px 12px;
}
.charslot-customize:hover { color: #fff !important; }
.mode-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
}
.mode-badge {
    font-family: 'RS Plain', serif;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 2px;
    text-shadow: 1px 1px 0 #000;
}
.mode-badge-iron { background: #4a3a2a; color: #c0c0c0; }
.mode-badge-nomile { background: #3a2020; color: #ff6666; }
.mode-badge-manual { background: #2a3a20; color: #88cc66; }
.mode-badge-auto { background: #20303a; color: #66aacc; }
.mode-select-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}
.mode-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #252017;
    border: 2px solid #3a3226;
    border-radius: 3px;
    padding: 8px 10px;
    cursor: pointer;
}
.mode-card:hover { border-color: #5a4f3e; }
.mode-card-active { border-color: #FF981F; background: #2e2820; }
.mode-card-icon {
    width: 20px;
    height: 20px;
    image-rendering: pixelated;
    flex-shrink: 0;
}
.mode-card-info { flex: 1; min-width: 0; }
.mode-card-name {
    font-family: 'RS Bold', 'RS Plain', serif;
    font-size: 13px;
    color: #FF981F;
    text-shadow: 1px 1px 0 #000;
}
.mode-card-desc {
    font-family: 'RS Plain', serif;
    font-size: 11px;
    color: #b0a48a;
    text-shadow: 1px 1px 0 #000;
    line-height: 1.3;
}
.mode-card-check {
    width: 14px;
    height: 14px;
    border: 2px solid #5a4f3e;
    border-radius: 2px;
    background: #1a1610;
    flex-shrink: 0;
    position: relative;
}
.mode-card-check.checked {
    background: #3b9420;
    border-color: #2d7a18;
}
.mode-card-check.checked::after {
    content: '';
    position: absolute;
    left: 2px; top: -1px;
    width: 5px; height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* === DEV PANEL === */
.dev-panel { min-width: 320px; max-width: 550px; width: 92%; }
.dev-section-title {
    font-family: 'RS Bold', 'RS Plain', serif;
    font-size: 14px;
    color: #FF981F;
    text-shadow: 1px 1px 0 #000;
    padding: 6px 0 4px;
    border-bottom: 1px solid #1a1610;
    box-shadow: 0 1px 0 rgba(107,98,86,0.3);
    margin-bottom: 6px;
}
.dev-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.dev-btn {
    font-family: 'RS Plain', serif;
    font-size: 13px;
    color: #FF981F;
    text-shadow: 1px 1px 0 #000;
    background: linear-gradient(180deg, #5a5044, #4a4238);
    border: 1px solid #1a1610;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 2px;
    white-space: nowrap;
}
.dev-btn:hover { background: linear-gradient(180deg, #6a6054, #5a5248); color: #fff; }
.dev-btn:active { background: #3a342c; }
.dev-btn.dev-btn-danger { color: #ff4444; }
.dev-btn.dev-btn-danger:hover { color: #ff6666; background: linear-gradient(180deg, #5a3030, #4a2828); }
.dev-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}
.dev-input {
    font-family: 'RS Plain', serif;
    font-size: 13px;
    color: #FF981F;
    background: #1a1610;
    border: 1px solid #5a4f3e;
    padding: 4px 8px;
    outline: none;
    border-radius: 2px;
    width: 100px;
}
.dev-input:focus { border-color: #FF981F; }
.dev-input.dev-input-wide { width: 160px; }
.dev-select {
    font-family: 'RS Plain', serif;
    font-size: 13px;
    color: #FF981F;
    background: #1a1610;
    border: 1px solid #5a4f3e;
    padding: 4px 6px;
    outline: none;
    border-radius: 2px;
    cursor: pointer;
}
.dev-select:focus { border-color: #FF981F; }
.dev-status {
    font-family: 'RS Plain', serif;
    font-size: 12px;
    color: #3b9420;
    text-shadow: 1px 1px 0 #000;
    min-height: 16px;
    padding: 2px 0;
}
.dev-status.error { color: #ff4444; }
/* Password prompt */
.dev-pwd-overlay {
    position: absolute; inset: 0; z-index: 55;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.5);
}
.dev-pwd-box {
    background: #5d5549;
    background-image: linear-gradient(180deg, #706358 0%, #5d5549 8%, #524940 92%, #3d3630 100%);
    border: 2px solid #000;
    box-shadow: inset 1px 1px 0 #8B7D6B, inset -1px -1px 0 #2A2420, 0 6px 24px rgba(0,0,0,0.7);
    padding: 5px;
    text-align: center;
}
.dev-pwd-inner {
    background: #3a342c;
    border: 1px solid #1a1610;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
    padding: 16px 24px;
}
.dev-pwd-inner input {
    font-family: 'RS Plain', serif;
    font-size: 15px;
    color: #FF981F;
    background: #1a1610;
    border: 1px solid #5a4f3e;
    padding: 6px 12px;
    outline: none;
    text-align: center;
    width: 160px;
    margin-top: 8px;
}
.dev-pwd-inner input:focus { border-color: #FF981F; }
.dev-pwd-label {
    font-family: 'RS Bold', 'RS Plain', serif;
    font-size: 16px;
    color: #FF981F;
    text-shadow: 1px 1px 0 #000;
}
@keyframes dev-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}
.dev-shake { animation: dev-shake 0.4s ease-in-out; }
