.page-gym,
body.pc-bodypage-gym {
    background: var(--bg) !important;
    background-image: none !important;
}

body.pc-bodypage-gym .pc-main,
.page-gym .pc-main {
    padding: 8px;
    background: var(--bg);
}

body.pc-bodypage-gym .pc-footer,
.page-gym .pc-footer {
    margin-top: 0;
    background: var(--panel);
}

body.pc-bodypage-gym .pc-shell,
body.pc-bodypage-gym .pc-topbar,
body.pc-bodypage-gym .pc-main,
.page-gym .pc-shell,
.page-gym .pc-topbar,
.page-gym .pc-main {
    background-image: none !important;
}

body.pc-bodypage-gym .pc-topbar,
.page-gym .pc-topbar {
    background: var(--panel);
    border-bottom-color: var(--line);
    box-shadow: none;
    backdrop-filter: none;
}

/* Gym Dashboard Header style */
.gym-dashboard-header {
    min-height: 56px;
    border-bottom: 1px solid var(--line);
    padding: 10px 24px;
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    background: var(--panel);
    border-radius: 6px 6px 0 0;
    margin: -8px -8px 0 -8px;
}

.gym-dashboard-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.gym-dashboard-brand-mark {
    width: 26px;
    height: 26px;
    color: var(--gold);
    flex: 0 0 auto;
}

.gym-dashboard-brand-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--gold);
    white-space: nowrap;
}

.gym-dashboard-tools {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
}

.gym-dashboard-tools .count-text {
    color: var(--muted);
    white-space: nowrap;
}

.gym-dashboard-tools .count-text strong {
    color: var(--gold);
}

        /* Base Styling */
.gym-original-shell,
.gym-original-shell * {
            box-sizing: border-box;
        }

.gym-original-shell * {
            margin: 0;
            padding: 0;
            image-rendering: pixelated; /* Retro pixel feel for sprites */
        }

.gym-original-shell {
            color: #b1d4c7;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Microsoft YaHei", sans-serif;
            font-size: 12px;
            line-height: 1.4;
        }

        /* Fixed 1:1 Dashboard Container */
.gym-original-shell .dashboard{
            width: 1280px;
            height: 856px;
            background-color: var(--bg-2);
            border: 2px solid var(--line-strong);
            border-radius: 8px;
            display: flex;
            flex-direction: column;
            padding: 8px;
            gap: 8px;
            position: relative;
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
            overflow: hidden;
        }

        /* Custom Scrollbar */
.gym-original-shell ::-webkit-scrollbar{
            width: 4px;
            height: 4px;
        }
.gym-original-shell ::-webkit-scrollbar-track{
            background: #01150f;
        }
.gym-original-shell ::-webkit-scrollbar-thumb{
            background: #094e35;
            border-radius: 2px;
        }
.gym-original-shell ::-webkit-scrollbar-thumb:hover{
            background: #107c55;
        }

        /* Text Accents & Typography */
.gym-original-shell h3{
            font-size: 13px;
            color: #f1c40f;
            margin-bottom: 8px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 6px;
        }
.gym-original-shell .text-gold{
            color: #d4af37 !important;
        }
.gym-original-shell .text-green{
            color: #2ecc71 !important;
        }
.gym-original-shell .text-muted{
            color: #6a8c80;
        }

        /* Top Header */
.gym-original-shell .header{
            height: 44px;
            background: linear-gradient(180deg, #02251a 0%, #011b14 100%);
            border: 1px solid #0a4d33;
            border-radius: 6px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 12px;
        }

.gym-original-shell .header-left{
            display: flex;
            align-items: center;
            gap: 8px;
        }

.gym-original-shell .logo-text{
            font-size: 15px;
            font-weight: bold;
            color: #ffffff;
            letter-spacing: 1px;
            font-family: monospace, sans-serif;
        }

.gym-original-shell .header-center{
            flex: 1;
            max-width: 380px;
            margin: 0 20px;
        }

.gym-original-shell .search-container{
            position: relative;
            width: 100%;
        }

.gym-original-shell .search-container input{
            width: 100%;
            height: 28px;
            background-color: #01110a;
            border: 1px solid #09432d;
            border-radius: 4px;
            padding: 0 32px 0 12px;
            color: #b1d4c7;
            font-size: 11px;
            outline: none;
            transition: border-color 0.2s;
        }

.gym-original-shell .search-container input:focus{
            border-color: #d4af37;
        }

.gym-original-shell .search-icon{
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            color: #53756a;
            pointer-events: none;
        }

.gym-original-shell .header-right{
            display: flex;
            align-items: center;
            gap: 12px;
        }

.gym-original-shell .stat-badge{
            background-color: #01110a;
            border: 1px solid #0a402a;
            border-radius: 4px;
            height: 28px;
            display: flex;
            align-items: center;
            padding: 0 10px;
            gap: 6px;
            color: #d4af37;
            font-size: 11px;
            cursor: pointer;
            transition: all 0.2s;
        }
.gym-original-shell .stat-badge:hover{
            border-color: #d4af37;
            background-color: #022014;
        }

.gym-original-shell .user-btn{
            background: linear-gradient(180deg, #114e36 0%, #093c28 100%);
            border: 1px solid #d4af37;
            color: #ffffff;
            height: 28px;
            border-radius: 4px;
            padding: 0 12px;
            font-size: 11px;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 6px;
            cursor: pointer;
            transition: all 0.2s;
        }
.gym-original-shell .user-btn:hover{
            background: #114e36;
            box-shadow: 0 0 8px rgba(212,175,55,0.3);
        }

        /* Main Workspace */
.gym-original-shell .workspace{
            flex: 1;
            display: grid;
            grid-template-columns: 184px 1fr;
            gap: 8px;
            overflow: visible;
        }

        /* Common Panel Styling */
.gym-original-shell .panel{
            background: radial-gradient(circle at 50% 50%, #02251a, #011b14);
            border: 1px solid #0a4e34;
            border-radius: 6px;
            padding: 10px;
            box-shadow: inset 0 0 8px rgba(10, 78, 52, 0.3);
            display: flex;
            flex-direction: column;
            position: relative;
        }

        /* Left Sidebar Panels */
.gym-original-shell .sidebar{
            display: flex;
            flex-direction: column;
            gap: 8px;
            overflow-y: auto;
        }

.gym-original-shell .sidebar-section{
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

.gym-original-shell .region-select-row{
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 4px;
        }

.gym-original-shell .region-select-row h3{
            white-space: nowrap;
        }

.gym-original-shell .dropdown{
            background-color: #01110a;
            border: 1px solid #09402a;
            border-radius: 4px;
            padding: 3px 8px;
            color: #b1d4c7;
            font-size: 11px;
            display: flex;
            align-items: center;
            gap: 4px;
            cursor: pointer;
        }
.gym-original-shell .dropdown:hover{
            border-color: #d4af37;
        }

        /* Gym List Group */
.gym-original-shell .gym-list{
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

.gym-original-shell .sidebar-gym-panel{
            flex: 1;
            min-height: 0;
        }

.gym-original-shell .sidebar-gym-panel .gym-list{
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            padding-right: 2px;
        }

.gym-original-shell .gym-item{
            display: flex;
            align-items: center;
            height: 28px;
            border: 1px solid #09402a;
            background-color: #01110a;
            border-radius: 4px;
            padding: 0 8px;
            gap: 6px;
            cursor: pointer;
            transition: all 0.2s;
        }
.gym-original-shell .gym-item:hover{
            border-color: #106343;
            background-color: #022014;
        }
.gym-original-shell .gym-item.active{
            border-color: #d4af37;
            background: linear-gradient(90deg, #042e1f 0%, #011d13 100%);
            box-shadow: 0 0 6px rgba(212, 175, 55, 0.15);
        }

.gym-original-shell .gym-badge-icon{
            width: 16px;
            height: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

.gym-original-shell .gym-name{
            flex: 1;
            font-size: 11px;
            color: #b1d4c7;
        }
.gym-original-shell .gym-item.active .gym-name{
            color: #ffffff;
            font-weight: bold;
        }

        /* Pill tags for types */
.gym-original-shell .type-tag{
            font-size: 9px;
            padding: 1px 6px;
            border-radius: 8px;
            color: #ffffff;
            font-weight: bold;
            text-align: center;
            min-width: 32px;
        }
.gym-original-shell .gym-sidebar-tag{
            min-width: 0;
            max-width: 58px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
.gym-original-shell .tag-grass{ background-color: #27ae60; }
.gym-original-shell .tag-flying{ background-color: #2980b9; }
.gym-original-shell .tag-normal{ background-color: #7f8c8d; }
.gym-original-shell .tag-water{ background-color: #1263a2; }
.gym-original-shell .tag-flying{ background-color: #2980b9; }
.gym-original-shell .tag-electric{ background-color: #d4ac0d; color: #000; }
.gym-original-shell .tag-ice{ background-color: #48c9b0; color: #000; }
.gym-original-shell .tag-dragon{ background-color: #8e44ad; }

.gym-original-shell .item-status{
            width: 14px;
            height: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* Progress Section */
.gym-original-shell .progress-bar-container{
            margin: 4px 0;
        }
.gym-original-shell .progress-text{
            display: flex;
            justify-content: space-between;
            font-size: 11px;
            margin-bottom: 4px;
        }
.gym-original-shell .progress-track{
            height: 5px;
            background-color: #01110a;
            border-radius: 3px;
            overflow: hidden;
            border: 1px solid #09402a;
        }
.gym-original-shell .progress-fill{
            height: 100%;
            background-color: #d4af37;
            box-shadow: 0 0 4px #d4af37;
            border-radius: 3px;
            transition: width 0.3s ease;
        }

.gym-original-shell .progress-checklist{
            display: flex;
            flex-direction: column;
            gap: 4px;
            margin-top: 6px;
        }
.gym-original-shell .checklist-item{
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 11px;
            height: 20px;
        }
.gym-original-shell .checklist-left{
            display: flex;
            align-items: center;
            gap: 6px;
        }

        /* Toggle switches */
.gym-original-shell .toggle-row{
            display: flex;
            justify-content: space-between;
            align-items: center;
            height: 24px;
            font-size: 11px;
        }

.gym-original-shell .switch{
            position: relative;
            display: inline-block;
            width: 28px;
            height: 15px;
        }
.gym-original-shell .switch input{
            opacity: 0;
            width: 0;
            height: 0;
        }
.gym-original-shell .slider{
            position: absolute;
            cursor: pointer;
            top: 0; left: 0; right: 0; bottom: 0;
            background-color: #01110a;
            border: 1px solid #09402a;
            border-radius: 15px;
            transition: .2s;
        }
.gym-original-shell .slider:before{
            position: absolute;
            content: "";
            height: 9px;
            width: 9px;
            left: 2px;
            bottom: 2px;
            background-color: #5a7b70;
            border-radius: 50%;
            transition: .2s;
        }
.gym-original-shell input:checked + .slider{
            background-color: #106f4c;
            border-color: #1b9b6d;
        }
.gym-original-shell input:checked + .slider:before{
            transform: translateX(13px);
            background-color: #ffffff;
        }

.gym-original-shell .btn-reset{
            background-color: #01110a;
            border: 1px solid #09402a;
            border-radius: 4px;
            height: 26px;
            color: #d4af37;
            font-size: 11px;
            font-weight: bold;
            cursor: pointer;
            margin-top: 4px;
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }
.gym-original-shell .btn-reset:hover{
            border-color: #d4af37;
            background-color: #022014;
        }

        /* Right Content Area Grid Layout */
.gym-original-shell .content-area{
            display: grid;
            grid-template-rows: minmax(440px, auto) auto;
            gap: 8px;
            overflow: visible;
        }

        /* Top Grid split: Map (Left 2-span) & Details/Status (Right 2-span) */
.gym-original-shell .top-row-grid{
            display: grid;
            grid-template-columns: 1.45fr 0.95fr;
            gap: 8px;
            overflow: visible;
        }

        /* Map Panel */
.gym-original-shell .map-panel{
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

.gym-original-shell .map-breadcrumbs-row{
            display: flex;
            justify-content: space-between;
            align-items: center;
            height: 26px;
        }

.gym-original-shell .breadcrumbs-wrap{
            display: flex;
            align-items: center;
            gap: 8px;
        }

.gym-original-shell .btn-back{
            background-color: #01110a;
            border: 1px solid #09402a;
            border-radius: 4px;
            padding: 3px 8px;
            color: #d4af37;
            font-size: 11px;
            display: flex;
            align-items: center;
            gap: 4px;
            cursor: pointer;
            transition: all 0.2s;
        }
.gym-original-shell .btn-back:hover{
            border-color: #d4af37;
            background-color: #022014;
        }

.gym-original-shell .breadcrumbs-path{
            font-size: 11px;
            color: #8cb0a3;
        }

.gym-original-shell .map-actions{
            display: flex;
            gap: 4px;
        }

.gym-original-shell .map-action-btn{
            background-color: #01110a;
            border: 1px solid #09402a;
            border-radius: 4px;
            padding: 3px 8px;
            color: #d4af37;
            font-size: 10px;
            display: flex;
            align-items: center;
            gap: 4px;
            cursor: pointer;
            transition: all 0.2s;
        }
.gym-original-shell .map-action-btn:hover{
            border-color: #d4af37;
            background-color: #022014;
        }
.gym-original-shell .map-action-btn.active-gold{
            background: linear-gradient(180deg, #d4af37 0%, #a28020 100%);
            border-color: #f1c40f;
            color: #02110c;
            font-weight: bold;
        }
.gym-original-shell .map-action-btn.active-gold:hover{
            background: #d4af37;
        }

        /* Map Frame & Grid Viewport */
.gym-original-shell .map-content-container{
            flex: 1;
            border: 1px solid #09402a;
            border-radius: 4px;
            background-color: #01110a;
            display: flex;
            overflow: hidden;
            position: relative;
        }

.gym-original-shell .map-viewport-wrapper{
            flex: 1;
            display: flex;
            flex-direction: column;
            border-right: 1px solid #09402a;
            transition: all 0.3s ease;
        }

.gym-original-shell .map-header{
            background-color: #022015;
            height: 24px;
            display: flex;
            align-items: center;
            padding: 0 10px;
            border-bottom: 1px solid #09402a;
            font-size: 11px;
            color: #b1d4c7;
        }

.gym-original-shell .map-viewport{
            flex: 1;
            background-color: #ad9768; /* Sandy floor */
            background-image: 
                linear-gradient(#9c8658 1px, transparent 1px),
                linear-gradient(90deg, #9c8658 1px, transparent 1px);
            background-size: 20px 20px;
            position: relative;
            overflow: hidden;
        }

        /* Screen Flash effect for Warp */
.gym-original-shell .warp-flash{
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            background-color: #ffffff;
            opacity: 0;
            z-index: 99;
            pointer-events: none;
            transition: opacity 0.1s ease;
        }
.gym-original-shell .warp-flash.active{
            opacity: 0.8;
        }

        /* Dialogue text box inside map */
.gym-original-shell .map-dialog-box{
            position: absolute;
            bottom: 8px; left: 8px; right: 8px;
            background-color: #01110a;
            border: 2px solid #d4af37;
            border-radius: 4px;
            padding: 8px 12px;
            z-index: 100;
            display: flex;
            justify-content: space-between;
            align-items: flex-end;
            box-shadow: 0 4px 10px rgba(0,0,0,0.6);
            transform: translateY(120%);
            transition: transform 0.25s cubic-bezier(0.1, 0.9, 0.2, 1);
        }
.gym-original-shell .map-dialog-box.show{
            transform: translateY(0);
        }
.gym-original-shell .map-dialog-text{
            font-family: monospace;
            font-size: 11px;
            line-height: 1.4;
            color: #ffffff;
            white-space: pre-line;
        }
.gym-original-shell .map-dialog-close{
            color: #d4af37;
            font-size: 10px;
            cursor: pointer;
            user-select: none;
            font-weight: bold;
            animation: bounce 1s infinite;
        }

        @keyframes bounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-3px); }
        }

        /* Map Elements */
.gym-original-shell .map-wall{
            position: absolute;
            background-color: #6e6556;
            border-bottom: 3px solid #4a4339;
            z-index: 10;
        }
.gym-original-shell .map-wall.top{
            top: 0; left: 0; right: 0; height: 16px;
        }
.gym-original-shell .map-wall.bottom{
            bottom: 0; left: 0; right: 0; height: 12px;
        }

.gym-original-shell .map-pillar{
            position: absolute;
            width: 14px;
            height: 28px;
            background: linear-gradient(180deg, #7f8c8d 0%, #566573 100%);
            border: 2px solid #2c3e50;
            border-radius: 2px;
            z-index: 11;
        }

        /* Potted Plants on Map */
.gym-original-shell .map-plant{
            position: absolute;
            width: 18px;
            height: 18px;
            background-color: #27ae60;
            border-radius: 50%;
            border: 2px solid #145a32;
            box-shadow: inset -2px -2px 0 #196f3d, 0 1px 3px rgba(0,0,0,0.4);
            z-index: 12;
        }
.gym-original-shell .map-plant::after{
            content: '';
            position: absolute;
            bottom: -3px; left: 4px;
            width: 6px; height: 4px;
            background-color: #a0522d;
            border: 1px solid #5c2c16;
            border-radius: 1px;
        }

        /* Teleport Pads */
.gym-original-shell .map-pad{
            position: absolute;
            width: 16px;
            height: 16px;
            background-color: #2980b9;
            border: 2px solid #1a5276;
            box-shadow: 0 0 6px #5dade2, inset 0 0 4px #fff;
            animation: pulse-glow 2s infinite ease-in-out;
            border-radius: 2px;
            z-index: 8;
            cursor: pointer;
            transition: border-color 0.2s;
        }
.gym-original-shell .map-pad:hover{
            border-color: #ffffff;
        }

        /* Red circles for trainer positions */
.gym-original-shell .map-trainer-marker{
            position: absolute;
            width: 15px;
            height: 15px;
            background-color: #c0392b;
            border: 1px solid #ffffff;
            border-radius: 50%;
            color: #ffffff;
            font-size: 9px;
            font-weight: bold;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 1px 3px rgba(0,0,0,0.5);
            z-index: 15;
            transition: opacity 0.25s ease;
        }

        /* Hidden Sparkle Item */
.gym-original-shell .hidden-item-sparkle{
            position: absolute;
            width: 14px;
            height: 14px;
            background-color: transparent;
            z-index: 18;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s ease;
        }
.gym-original-shell .hidden-item-sparkle.show{
            opacity: 1;
            pointer-events: auto;
        }
.gym-original-shell .hidden-item-sparkle svg{
            animation: sparkle-glow 1.5s infinite ease-in-out;
        }

        @keyframes sparkle-glow {
            0%, 100% { filter: drop-shadow(0 0 1px #f1c40f); transform: scale(0.9); }
            50% { filter: drop-shadow(0 0 6px #f1c40f); transform: scale(1.1); }
        }

        /* Player avatar */
.gym-original-shell .map-player{
            position: absolute;
            width: 14px;
            height: 14px;
            z-index: 20;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: top 0.35s cubic-bezier(0.1, 0.9, 0.2, 1), left 0.35s cubic-bezier(0.1, 0.9, 0.2, 1);
        }
.gym-original-shell .map-player-inner{
            background-color: #27ae60; 
            border-radius: 50%; 
            width: 14px; 
            height: 14px; 
            display: flex; 
            align-items: center; 
            justify-content: center; 
            border: 1.5px solid #fff; 
            box-shadow: 0 0 6px #27ae60;
        }

        @keyframes pulse-glow {
            0%, 100% { box-shadow: 0 0 2px #5dade2, inset 0 0 2px #fff; }
            50% { box-shadow: 0 0 8px #5dade2, inset 0 0 4px #fff; }
        }

        /* Map Legend Panel */
.gym-original-shell .map-sidebar{
            width: 170px;
            background-color: #01110a;
            display: flex;
            flex-direction: column;
            padding: 8px;
            gap: 8px;
            overflow-y: auto;
            transition: all 0.3s ease;
        }

.gym-original-shell .mechanism-hints{
            border-bottom: 1px solid #09402a;
            padding-bottom: 6px;
        }
.gym-original-shell .mechanism-hints p{
            font-size: 10px;
            line-height: 1.3;
            margin-bottom: 6px;
            color: #8cb0a3;
            display: flex;
            gap: 4px;
        }

.gym-original-shell .legend-title{
            font-size: 10px;
            font-weight: bold;
            color: #d4af37;
            margin-bottom: 4px;
        }

.gym-original-shell .legend-item{
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 10px;
            height: 18px;
            color: #b1d4c7;
        }

.gym-original-shell .legend-icon{
            width: 14px;
            height: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* Right Panel Top: Gym Details */
.gym-original-shell .details-wrapper{
            display: flex;
            flex-direction: column;
            gap: 8px;
            overflow: hidden;
        }

.gym-original-shell .gym-details-panel{
            background: linear-gradient(180deg, #02251a 0%, #011b14 100%);
            border: 1px solid #0a4e34;
            border-radius: 6px;
            padding: 10px;
            height: 170px;
            display: flex;
            gap: 8px;
            position: relative;
        }

.gym-original-shell .details-left{
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

.gym-original-shell .details-badge-row{
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 11px;
            color: #8cb0a3;
        }

.gym-original-shell .leader-large-title{
            font-size: 18px;
            font-weight: bold;
            color: #ffffff;
            margin: 4px 0;
            display: flex;
            align-items: baseline;
            gap: 6px;
        }
.gym-original-shell .leader-large-title span{
            font-size: 11px;
            color: #8cb0a3;
            font-weight: normal;
        }

.gym-original-shell .leader-avatar-wrap{
            width: 84px;
            height: 84px;
            display: flex;
            align-items: center;
            justify-content: center;
            background-color: #01110a;
            border: 1px solid #09402a;
            border-radius: 4px;
            overflow: hidden;
            box-shadow: inset 0 0 6px rgba(10, 78, 52, 0.4);
        }

.gym-original-shell .leader-avatar-wrap img{
            width: 80px;
            height: 80px;
            object-fit: contain;
        }

        /* Regular Badge Widget */
.gym-original-shell .regular-badge-box{
            width: 155px;
            background-color: #01110a;
            border: 1px solid #d4af37;
            border-radius: 4px;
            padding: 8px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
            gap: 4px;
            box-shadow: 0 0 8px rgba(212,175,55,0.05);
        }

.gym-original-shell .regular-badge-title{
            font-size: 10px;
            color: #d4af37;
            font-weight: bold;
            border-bottom: 1px solid #2d2613;
            width: 100%;
            text-align: center;
            padding-bottom: 3px;
            margin-bottom: 4px;
        }

.gym-original-shell .regular-badge-img{
            width: 48px;
            height: 48px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
.gym-original-shell .regular-badge-img img{
            width: 42px;
            height: 42px;
            object-fit: contain;
        }

.gym-original-shell .badge-image-missing{
            font-size: 9px;
            color: #6a8c80;
            text-transform: uppercase;
            letter-spacing: 0.06em;
        }

.gym-original-shell .badge-image-missing.small{
            font-size: 8px;
        }

.gym-original-shell .regular-badge-desc{
            font-size: 9px;
            text-align: center;
            line-height: 1.2;
            color: #b1d4c7;
            margin: 4px 0;
            white-space: pre-line;
            max-height: 92px;
            overflow-y: auto;
            padding-right: 2px;
        }

.gym-original-shell .regular-badge-link{
            font-size: 9px;
            color: #d4af37;
            text-decoration: none;
            text-align: center;
            line-height: 1.3;
            cursor: default;
            transition: color 0.2s;
        }
.gym-original-shell .regular-badge-link:hover{
            color: #f1c40f;
        }

        /* Stacked Status & Rewards Panels */
.gym-original-shell .status-rewards-row{
            flex: 1;
            display: grid;
            grid-template-columns: 1fr 1.2fr;
            gap: 8px;
            overflow: hidden;
        }

.gym-original-shell .status-panel{
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

.gym-original-shell .status-list-row{
            display: flex;
            justify-content: space-between;
            align-items: center;
            height: 20px;
            font-size: 11px;
        }

.gym-original-shell .status-pill{
            background-color: #106f4c;
            color: #ffffff;
            border-radius: 10px;
            padding: 1px 8px;
            font-size: 10px;
            font-weight: bold;
        }

.gym-original-shell .btn-status-action{
            width: 100%;
            height: 26px;
            border-radius: 4px;
            font-size: 11px;
            font-weight: bold;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
            transition: all 0.2s;
        }
.gym-original-shell .btn-status-action.fill-gold{
            background: linear-gradient(180deg, #d4af37 0%, #a28020 100%);
            border: 1px solid #f1c40f;
            color: #02110c;
        }
.gym-original-shell .btn-status-action.fill-gold:hover{
            background: #d4af37;
            box-shadow: 0 0 6px #d4af37;
        }
.gym-original-shell .btn-status-action.outline-gold{
            background-color: #01110a;
            border: 1px solid #09402a;
            color: #d4af37;
        }
.gym-original-shell .btn-status-action.outline-gold:hover{
            border-color: #d4af37;
            background-color: #022014;
        }

        /* Rewards Panel */
.gym-original-shell .rewards-panel{
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

.gym-original-shell .rewards-grid{
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 4px;
        }

.gym-original-shell .reward-card{
            background-color: #01110a;
            border: 1px solid #09402a;
            border-radius: 4px;
            height: 72px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 4px;
            padding: 4px;
            cursor: default;
            transition: all 0.2s;
        }
.gym-original-shell .reward-card:hover{
            border-color: #106343;
            background-color: #021a11;
        }

.gym-original-shell .reward-icon-box{
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

.gym-original-shell .reward-label{
            font-size: 9px;
            color: #8cb0a3;
            text-align: center;
            line-height: 1.1;
            transform: scale(0.9);
        }

.gym-original-shell .extra-reward-box{
            background-color: #01110a;
            border: 1px solid #09402a;
            border-radius: 4px;
            height: 26px;
            display: flex;
            align-items: center;
            padding: 0 8px;
            gap: 6px;
            font-size: 10px;
            color: #b1d4c7;
        }

.gym-original-shell .extra-reward-box.multiline{
            height: auto;
            align-items: flex-start;
            padding: 6px 8px;
        }

.gym-original-shell .extra-reward-text{
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

.gym-original-shell .extra-reward-box.multiline .extra-reward-text{
            overflow: visible;
            text-overflow: unset;
            white-space: pre-line;
            line-height: 1.35;
        }

        /* Bottom Row Column Panels */
.gym-original-shell .bottom-row-grid{
            display: grid;
            grid-template-columns: 1.42fr 1.2fr 0.74fr 0.84fr;
            gap: 8px;
            align-items: start;
            overflow: visible;
        }

.gym-original-shell .bottom-panel{
            overflow: hidden;
            min-height: 0;
        }

        /* Tables inside bottom panels */
.gym-original-shell .table-container{
            flex: 1;
            overflow: auto;
            min-height: 0;
        }

.gym-original-shell .data-table{
            width: 100%;
            border-collapse: collapse;
            font-size: 11px;
            text-align: left;
        }

.gym-original-shell .data-table th{
            color: #6a8c80;
            padding: 4px 6px;
            font-weight: normal;
            border-bottom: 1px solid #09402a;
            background-color: #01110a;
            position: sticky;
            top: 0;
            z-index: 2;
        }

.gym-original-shell .data-table td{
            padding: 5px 6px;
            border-bottom: 1px solid #04251a;
            vertical-align: middle;
            color: #b1d4c7;
        }

.gym-original-shell .location-cell{
            max-width: 128px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

.gym-original-shell .trainer-roster-table{
            table-layout: fixed;
            font-size: 10px;
        }

.gym-original-shell .trainer-roster-table .col-tid{
            width: 24px;
        }

.gym-original-shell .trainer-roster-table .col-trainer{
            width: auto;
        }

.gym-original-shell .trainer-roster-table .col-level{
            width: 36px;
        }

.gym-original-shell .trainer-roster-table .col-party{
            width: 30px;
        }

.gym-original-shell .trainer-roster-table .col-location{
            width: 70px;
        }

.gym-original-shell .trainer-roster-table .col-action{
            width: 38px;
        }

.gym-original-shell .trainer-roster-table td:nth-child(2){
            white-space: nowrap;
            line-height: 1.2;
            min-width: 0;
        }

.gym-original-shell .trainer-roster-table .location-cell{
            max-width: none;
            white-space: normal;
            overflow: visible;
            text-overflow: clip;
            line-height: 1.2;
            font-size: 10px;
        }

.gym-original-shell .trainer-roster-table td:nth-child(3),
.gym-original-shell .trainer-roster-table td:nth-child(4),
.gym-original-shell .trainer-roster-table td:nth-child(6){
            white-space: nowrap;
        }

.gym-original-shell .trainer-level-cell{
            font-variant-numeric: tabular-nums;
            letter-spacing: -0.01em;
        }

.gym-original-shell .trainer-action-cell{
            text-align: right;
        }

.gym-original-shell .trainer-party-badge{
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 18px;
            padding: 0 4px;
            border-radius: 999px;
            background: rgba(177, 212, 199, 0.14);
            border: 1px solid rgba(177, 212, 199, 0.24);
            color: #f3f6f4;
            font-size: 8px;
            font-weight: 700;
            line-height: 1.4;
        }

.gym-original-shell .trainer-name-cell{
            display: flex;
            align-items: center;
            gap: 4px;
            min-width: 0;
        }

.gym-original-shell .trainer-name-cell span{
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
        }

.gym-original-shell .trainer-name-cell .sprite-cell{
            width: 20px;
            height: 20px;
            flex: 0 0 20px;
        }

.gym-original-shell .trainer-name-cell .sprite-cell img{
            width: 28px;
            height: 28px;
        }

.gym-original-shell .trainer-detail-btn{
            min-height: 20px;
            width: 100%;
            padding: 0 4px;
            border: 1px solid #0d5a3d;
            border-radius: 4px;
            background: #02170f;
            color: #d4af37;
            font-size: 8px;
            line-height: 1;
            cursor: pointer;
        }

.gym-original-shell .trainer-detail-btn:hover{
            border-color: #d4af37;
            background: #032117;
        }

.gym-original-shell .leader-team-table{
            table-layout: fixed;
            font-size: 10px;
        }

.gym-original-shell .leader-team-table th:nth-child(1){
            width: 92px;
        }

.gym-original-shell .leader-team-table th:nth-child(2){
            width: 42px;
        }

.gym-original-shell .leader-team-table td:first-child{
            white-space: normal;
        }

.gym-original-shell .leader-team-table td:last-child{
            white-space: normal;
            word-break: break-word;
            line-height: 1.25;
        }

.gym-original-shell .leader-held-item{
            margin-top: 2px;
            font-size: 9px;
            line-height: 1.2;
        }

.gym-original-shell .data-table tr:hover td{
            background-color: #022015;
            color: #ffffff;
        }

.gym-original-shell .data-table tr.is-active-map td{
            background-color: rgba(212, 175, 55, 0.08);
        }

.gym-original-shell .trainer-id-circle{
            width: 14px;
            height: 14px;
            background-color: #c0392b;
            border-radius: 50%;
            color: #ffffff;
            font-weight: bold;
            font-size: 9px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

.gym-original-shell .sprite-cell{
            width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
.gym-original-shell .sprite-cell img{
            width: 32px;
            height: 32px;
            object-fit: contain;
        }

.gym-original-shell .pokemon-sprite-link,
.gym-original-shell .pokemon-entry-link,
.gym-original-shell .map-inline-link,
.gym-original-shell .map-panel-link{
    color: inherit;
    text-decoration: none;
}

.gym-original-shell .pokemon-sprite-link{
    display: flex;
    align-items: center;
    justify-content: center;
}

.gym-original-shell .pokemon-sprite-link:hover img,
.gym-original-shell .pokemon-entry-link:hover img{
    filter: brightness(1.08);
}

.gym-original-shell .pokemon-entry-link{
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.gym-original-shell .pokemon-entry-link span{
    color: #b1d4c7;
}

.gym-original-shell .pokemon-entry-link:hover span,
.gym-original-shell .map-inline-link:hover,
.gym-original-shell .map-panel-link:hover{
    color: #ffffff;
}

.gym-original-shell .map-inline-link,
.gym-original-shell .map-panel-link{
    border-bottom: 1px solid rgba(212, 175, 55, 0.25);
}

.gym-original-shell .map-inline-link:hover,
.gym-original-shell .map-panel-link:hover{
    border-bottom-color: rgba(212, 175, 55, 0.7);
}

        /* Recommended Team Grid */
.gym-original-shell .recommend-team-grid{
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 4px;
            margin-bottom: 6px;
        }

.gym-original-shell .recommend-card{
            background-color: #01110a;
            border: 1px solid #09402a;
            border-radius: 4px;
            padding: 4px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            position: relative;
            cursor: pointer;
            transition: all 0.2s;
        }
.gym-original-shell .recommend-card:hover{
            border-color: #d4af37;
            background-color: #021a11;
        }

.gym-original-shell .recommend-sprite{
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
.gym-original-shell .recommend-sprite img{
            width: 40px;
            height: 40px;
            object-fit: contain;
        }

.gym-original-shell .recommend-name{
            font-size: 9px;
            font-weight: bold;
            color: #ffffff;
            margin-top: 2px;
            text-align: center;
        }

.gym-original-shell .recommend-level{
            font-size: 9px;
            color: #6a8c80;
        }

.gym-original-shell .recommend-footer-banner{
            background: linear-gradient(90deg, #511818 0%, #01110a 100%);
            border: 1px solid #78281f;
            border-radius: 4px;
            height: 24px;
            display: flex;
            align-items: center;
            padding: 0 8px;
            gap: 6px;
            font-size: 10px;
            color: #e74c3c;
            font-weight: bold;
        }

        /* Column 4: Split sections */
.gym-original-shell .split-column{
            display: flex;
            flex-direction: column;
            gap: 6px;
            height: 100%;
            min-height: 0;
        }

.gym-original-shell .split-subpanel{
            background-color: #01110a;
            border: 1px solid #09402a;
            border-radius: 4px;
            padding: 6px 8px;
            display: flex;
            flex-direction: column;
            min-height: 0;
        }

.gym-original-shell .split-subpanel-title{
            font-size: 11px;
            font-weight: bold;
            color: #d4af37;
            border-bottom: 1px solid #0d3827;
            padding-bottom: 2px;
            margin-bottom: 4px;
        }

.gym-original-shell .guide-tips-list{
            list-style: none;
            font-size: 10px;
            line-height: 1.4;
            color: #8cb0a3;
        }
.gym-original-shell .guide-tips-list li{
            margin-bottom: 2px;
            display: flex;
            gap: 4px;
        }

.gym-original-shell .rematch-text{
            font-size: 10px;
            line-height: 1.3;
            color: #8cb0a3;
        }


.gym-original-shell {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: calc(100vh - 132px);
    padding: 8px;
    position: relative;
}

.gym-original-shell .dashboard {
    margin: 0 auto;
    width: min(1460px, calc(100vw - 32px));
    min-height: 920px;
    height: auto;
    max-width: none;
}

.gym-original-shell [hidden] {
    display: none !important;
}

.gym-original-shell .gym-state-card {
    display: none;
    width: 100%;
    align-items: center;
    justify-content: center;
}

.gym-original-shell .gym-state-card .panel {
    width: min(1460px, calc(100vw - 32px));
    min-height: 920px;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 10px;
}

.gym-original-shell[data-state="loading"] .dashboard {
    display: none;
}

.gym-original-shell[data-state="loading"] .gym-state-loading {
    display: flex;
}

.gym-original-shell[data-state="error"] .dashboard {
    display: none;
}

.gym-original-shell[data-state="error"] .gym-state-error {
    display: flex;
}

.gym-original-shell .real-map-layout {
    display: flex;
    width: 100%;
    height: 100%;
}

.gym-original-shell .real-map-frame {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background-color: #010d09;
    background-image: none;
    overflow: auto;
    padding: 8px;
}

.gym-original-shell .real-map-canvas {
    position: relative;
    flex: 0 0 auto;
}

.gym-original-shell .real-map-link {
    display: block;
    width: 100%;
    height: 100%;
}

.gym-original-shell .real-map-link:hover .real-gym-map-image {
    filter: brightness(1.03);
}

.gym-original-shell .real-gym-map-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: fill;
    background-color: #010d09;
    image-rendering: pixelated;
}

.gym-original-shell .map-trainer-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.gym-original-shell .map-trainer-badge {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 1px solid #ffffff;
    background: linear-gradient(180deg, #d94b3f 0%, #8f2018 100%);
    color: #ffffff;
    font-size: 9px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
    pointer-events: auto;
    z-index: 2;
}

.gym-original-shell .map-leader-badge {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 1px solid #f9e79f;
    background: linear-gradient(180deg, #f4d03f 0%, #b7950b 100%);
    color: #02110c;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    pointer-events: auto;
    z-index: 3;
}

.gym-original-shell .map-leader-badge:hover {
    filter: brightness(1.06);
}

.gym-original-shell .real-map-sidebar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
}

.gym-original-shell .map-view-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gym-original-shell .map-view-button {
    width: 100%;
    border: 1px solid #09402a;
    background-color: #01110a;
    border-radius: 4px;
    color: #b1d4c7;
    text-align: left;
    padding: 6px 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: all 0.2s;
}

.gym-original-shell .map-view-button:hover,
.gym-original-shell .map-view-button.is-active {
    border-color: #d4af37;
    background-color: #022014;
}

.gym-original-shell .map-view-button strong {
    color: #ffffff;
    font-size: 11px;
}

.gym-original-shell .map-trainer-list{
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gym-original-shell .map-trainer-row{
    display: grid;
    grid-template-columns: 16px 1fr;
    gap: 6px;
    align-items: start;
}

.gym-original-shell .map-leader-row .map-trainer-copy strong{
    color: #f1c40f;
}

.gym-original-shell .map-trainer-copy{
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.gym-original-shell .map-trainer-copy strong{
    color: #ffffff;
    font-size: 10px;
    line-height: 1.3;
}

.gym-original-shell .map-trainer-copy span,
.gym-original-shell .map-trainer-empty{
    color: #8cb0a3;
    font-size: 10px;
    line-height: 1.35;
}

.gym-original-shell .map-trainer-copy span .map-inline-link{
    color: inherit;
}

.gym-original-shell .map-view-button span {
    color: #8cb0a3;
    font-size: 10px;
    line-height: 1.3;
}

.gym-original-shell .leader-id-circle{
    background: linear-gradient(180deg, #f4d03f 0%, #b7950b 100%);
    color: #02110c;
}

.gym-original-shell .map-header{
    gap: 4px;
}

.gym-original-shell .map-header-meta{
    color: #8cb0a3;
}

.gym-original-shell #gym-facts-panel,
.gym-original-shell #gym-rewards-panel,
.gym-original-shell #gym-extra-maps-panel {
    justify-content: flex-start;
    gap: 8px;
}

.gym-original-shell #gym-facts-panel .extra-reward-box,
.gym-original-shell #gym-rewards-panel .extra-reward-box,
.gym-original-shell #gym-extra-maps-panel .recommend-footer-banner {
    margin-top: auto;
}

.gym-original-shell .bottom-map-view-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gym-original-shell .bottom-map-view-button {
    align-items: center;
    flex-direction: row;
    gap: 8px;
    padding: 6px;
}

.gym-original-shell .bottom-map-view-thumb {
    width: 76px;
    height: 52px;
    flex: 0 0 auto;
    border-radius: 4px;
    overflow: hidden;
    background-color: #010d09;
}

.gym-original-shell .bottom-map-view-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gym-original-shell .bottom-map-view-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gym-original-shell .bottom-map-view-copy strong {
    color: #ffffff;
    font-size: 11px;
}

.gym-original-shell .bottom-map-view-copy span {
    color: #8cb0a3;
    font-size: 10px;
    line-height: 1.3;
}

.gym-original-shell .dialogue-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 2px;
}

@media (max-width: 1180px) {
    .gym-original-shell {
        align-items: flex-start;
        min-height: auto;
        padding-top: 4px;
    }

    .gym-original-shell .dashboard {
        height: auto;
        min-height: 880px;
        max-height: none;
    }

    .gym-original-shell .gym-state-card .panel {
        min-height: 880px;
        max-height: none;
    }
}

.gym-original-shell .dialogue-line {
    color: #8cb0a3;
    font-size: 10px;
    line-height: 1.35;
    white-space: pre-line;
    margin-bottom: 8px;
}

.gym-original-shell .dialogue-line:last-child {
    margin-bottom: 0;
}

.gym-original-shell .dialogue-label {
    color: #d4af37;
    font-weight: bold;
    margin-bottom: 3px;
}

.gym-original-shell .trainer-detail-modal[hidden]{
    display: none !important;
}

.gym-original-shell .trainer-detail-modal{
    position: fixed;
    inset: 0;
    z-index: 120;
}

.gym-original-shell .trainer-detail-backdrop{
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
}

.gym-original-shell .trainer-detail-card{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(720px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border: 1px solid #0f6a47;
    border-radius: 8px;
    background: radial-gradient(circle at 50% 0%, #032619, #01150f 72%);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.5);
}

.gym-original-shell .trainer-detail-header{
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.gym-original-shell .trainer-detail-header h3{
    margin-bottom: 2px;
}

.gym-original-shell .trainer-detail-kicker{
    color: #6a8c80;
    font-size: 10px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.gym-original-shell .trainer-detail-subtitle{
    color: #8cb0a3;
    font-size: 10px;
    line-height: 1.35;
}

.gym-original-shell .trainer-detail-close{
    width: 28px;
    min-height: 28px;
    border: 1px solid #0d5a3d;
    border-radius: 6px;
    background: #02170f;
    color: #d4af37;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.gym-original-shell .trainer-detail-close:hover{
    border-color: #d4af37;
}

.gym-original-shell .trainer-detail-meta{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.gym-original-shell .trainer-detail-meta-row{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 8px;
    border: 1px solid #083c27;
    border-radius: 6px;
    background: #01110a;
    font-size: 10px;
}

.gym-original-shell .trainer-detail-meta-row span:last-child{
    min-width: 0;
    text-align: right;
}

.gym-original-shell .trainer-detail-table-shell{
    min-height: 0;
    overflow-y: auto;
    border: 1px solid #083c27;
    border-radius: 6px;
    background: #01110a;
}

.gym-original-shell .trainer-detail-table{
    table-layout: fixed;
}

.gym-original-shell .trainer-detail-table th:nth-child(1){
    width: 116px;
}

.gym-original-shell .trainer-detail-table th:nth-child(2){
    width: 58px;
}

.gym-original-shell .trainer-detail-table th:nth-child(3){
    width: 72px;
}

.gym-original-shell .trainer-detail-table td:first-child{
    white-space: normal;
}

.gym-original-shell .trainer-detail-table .pokemon-entry-link{
    align-items: flex-start;
}

.gym-original-shell .trainer-detail-moves{
    white-space: normal;
    word-break: break-word;
    line-height: 1.3;
}
