/*
 * The Mels Live - Authentic High-Fidelity UI Styling
 * Clean, modern Sims 4 glassmorphic aesthetic:
 * - Oceanic blues, fresh greens, glowing Plumbobs, and crisp white typography
 */

:root {
    --sims-blue-dark: #0f2438;
    --sims-blue-panel: rgba(18, 44, 70, 0.88);
    --sims-blue-card: rgba(25, 60, 95, 0.75);
    --sims-border: rgba(120, 180, 240, 0.35);
    --sims-plumbob-green: #2ecc71;
    --sims-simoleon-gold: #f39c12;
    --sims-white: #ffffff;
    --sims-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
}

body {
    background-color: var(--sims-blue-dark);
    font-family: var(--sims-font);
    color: var(--sims-white);
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

#canvasContainer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    overflow: hidden;
    touch-action: none;
}

/* ==========================================================================
/* ==========================================================================
   TOP CONTROLS & CAMERA TOOLBAR
   ========================================================================== */

/* Current Lot HUD Banner */
/* ==========================================================================
   TOP HEADER & TOOLBAR LAYOUT (NO-OVERLAP GUARANTEE)
   ========================================================================== */
.game-header {
    position: absolute;
    top: 12px;
    left: 16px;
    right: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    z-index: 20;
    pointer-events: none;
}

.current-lot-hud {
    position: relative;
    top: 0;
    left: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--sims-blue-panel);
    border: 1.5px solid var(--sims-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 18px;
    padding: 6px 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    color: #fff;
    pointer-events: auto;
}

.lot-pin-icon {
    font-size: 1.2rem;
}

.lot-hud-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lot-hud-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lot-hud-name {
    font-size: 0.90rem;
    font-weight: 700;
    color: var(--sims-white);
    white-space: nowrap;
}

.lot-hud-owner {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--sims-text-muted);
    white-space: nowrap;
}

.lot-hud-details-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 1px;
}

.lot-hud-separator {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.72rem;
}

.tso-simtime-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(30, 41, 59, 0.65);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 10px;
    padding: 1px 7px;
    color: #e2e8f0;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.tso-phase-icon {
    font-size: 0.82rem;
    filter: drop-shadow(0 0 4px rgba(255, 200, 50, 0.5));
}

.tso-time-text {
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.3px;
    font-variant-numeric: tabular-nums;
}

.tso-day-pill {
    color: #7dd3fc;
    font-size: 0.66rem;
    font-weight: 600;
    text-transform: uppercase;
}

.top-toolbar {
    position: relative;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    pointer-events: auto;
    max-width: calc(100% - 350px);
}

.top-toolbar-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 5px;
    max-width: 100%;
}

.top-toolbar-row.utility-row {
    gap: 8px;
}

.top-toolbar-row.modes-row {
    gap: 4px;
}

.toolbar-btn-group {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

#topToolbar .sims-btn {
    padding: 5px 9px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 14px;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
    line-height: 1.2;
    transition: transform 0.12s ease, filter 0.12s ease, background 0.12s ease;
}

#topToolbar .sims-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.12);
}

#topToolbar .sims-btn:active {
    transform: translateY(1px);
}

@media (max-width: 900px) {
    .game-header {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    .current-lot-hud {
        align-self: flex-start;
    }
    .top-toolbar {
        max-width: 100%;
        align-items: flex-start;
    }
    .top-toolbar-row {
        justify-content: flex-start;
    }
}

.camera-group {
    background: rgba(15, 30, 48, 0.65);
    border: 1px solid rgba(80, 160, 220, 0.25);
    border-radius: 20px;
    padding: 2px 4px;
    backdrop-filter: blur(8px);
}

.cam-ctrl-btn {
    width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.85rem !important;
    border-radius: 50% !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer;
    color: #ffffff;
    transition: all 0.15s ease;
}

.cam-ctrl-btn:hover {
    background: rgba(46, 204, 113, 0.3) !important;
    color: var(--sims-plumbob-green) !important;
    transform: scale(1.1);
}

.sims-btn {
    background: var(--sims-blue-panel);
    border: 1.5px solid var(--sims-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--sims-white);
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

.sims-btn:hover {
    background: rgba(35, 85, 135, 0.95);
    border-color: var(--sims-plumbob-green);
    transform: translateY(-1px);
}

/* ==========================================================================
   BOTTOM MASTER HUD (Sims 4 Style)
   ========================================================================== */
#bottomHUD {
    position: absolute;
    bottom: 14px;
    left: 18px;
    right: 18px;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    pointer-events: none;
}

/* Left Cluster: Side-by-side Profile Card & Action Queue (No vertical overlap) */
.sim-hud-left-cluster {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 12px;
    pointer-events: auto;
}

/* Active Sim Portrait Card (Bottom-Left) */
.sim-profile-card {
    pointer-events: auto;
    background: var(--sims-blue-panel);
    border: 2px solid var(--sims-border);
    backdrop-filter: blur(14px);
    border-radius: 24px;
    padding: 10px 18px 10px 10px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}

.sim-portrait-wrap {
    position: relative;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    border: 3px solid var(--sims-plumbob-green);
    background: radial-gradient(circle, #256598 0%, #102d45 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    cursor: pointer;
    box-shadow: 0 0 14px rgba(46, 204, 113, 0.45);
    transition: transform 0.2s;
}

.sim-portrait-wrap:hover {
    transform: scale(1.08);
}

.plumbob-icon-badge {
    position: absolute;
    top: -8px;
    right: -4px;
    font-size: 1.1rem;
    filter: drop-shadow(0 0 4px #2ecc71);
}

.sim-info-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 140px;
}

.sim-info-col .hud-career-chip,
.sim-info-col .sim-diamonds-badge,
.sim-info-col .hud-phone-btn {
    display: inline-flex !important;
    width: fit-content !important;
    max-width: 150px;
    padding: 2px 8px !important;
    font-size: 0.7rem !important;
    border-radius: 12px !important;
    margin: 1px 0 !important;
}

.sim-name {
    font-size: 1.05rem;
    font-weight: 700;
}

.sim-emotion-badge {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--sims-plumbob-green);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sim-wallet {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--sims-simoleon-gold);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ==========================================================================
   ACTIVE ACTIVITY CARD & ACTION QUEUE BAR (THE SIMS STYLE)
   ========================================================================== */
.action-queue-bar {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    min-height: 46px;
}

.active-activity-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(16, 44, 74, 0.95), rgba(8, 22, 38, 0.95));
    border: 2px solid var(--sims-plumbob-green);
    box-shadow: 0 4px 18px rgba(46, 204, 113, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 5px 12px 5px 6px;
    animation: pulseActiveActivity 2s infinite ease-in-out;
}

@keyframes pulseActiveActivity {
    0%, 100% { box-shadow: 0 4px 18px rgba(46, 204, 113, 0.35); }
    50% { box-shadow: 0 4px 24px rgba(46, 204, 113, 0.7); }
}

.active-activity-icon-slot {
    position: relative;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(46, 204, 113, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.activity-spinner-ring {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--sims-plumbob-green);
    border-right-color: rgba(85, 239, 196, 0.65);
    animation: spinRing 1.5s linear infinite;
}

@keyframes spinRing {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.active-activity-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 100px;
    max-width: 160px;
}

.activity-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.2px;
}

.activity-progress-track {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    overflow: hidden;
}

.activity-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2ecc71, #55efc4);
    border-radius: 3px;
    transition: width 0.12s ease-out;
}

.activity-cancel-btn {
    background: rgba(231, 76, 60, 0.25);
    border: 1px solid rgba(231, 76, 60, 0.6);
    color: #ff7675;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: bold;
    transition: all 0.2s;
    margin-left: 2px;
}

.activity-cancel-btn:hover {
    background: #e74c3c;
    color: #fff;
    transform: scale(1.15);
}

.action-slot {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(18, 44, 70, 0.9);
    border: 2px solid var(--sims-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    position: relative;
    transition: transform 0.2s;
}

.action-slot.queued {
    border-color: rgba(255, 255, 255, 0.35);
}

.action-slot.queued:hover {
    transform: scale(1.1);
    border-color: #f39c12;
}

.action-slot.queued:hover::after {
    content: "✕";
    position: absolute;
    top: -4px;
    right: -4px;
    background: #e74c3c;
    color: #fff;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Needs Motives Panel (Bottom-Right) */
.needs-panel {
    pointer-events: auto;
    background: var(--sims-blue-panel);
    border: 2px solid var(--sims-border);
    backdrop-filter: blur(14px);
    border-radius: 20px;
    padding: 12px 18px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 7px;
    width: 280px;
}

.needs-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #a4c8e8;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 4px;
}

.need-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.74rem;
    padding: 3px 5px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
    user-select: none;
}

.need-row:hover {
    background: rgba(46, 204, 113, 0.18);
    transform: translateX(3px);
}

.need-row:hover .need-label {
    color: #2ecc71;
    font-weight: 700;
}

.need-row:active {
    transform: scale(0.97);
}

.need-label {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 80px;
}

.need-track {
    flex: 1;
    height: 9px;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.need-fill {
    height: 100%;
    width: 80%;
    background-color: var(--sims-plumbob-green);
    border-radius: 5px;
    transition: width 0.4s ease, background-color 0.4s ease;
}

/* ==========================================================================
   CIRCULAR FLOATING PIE MENU
   ========================================================================== */
#pieMenuContainer {
    display: none;
    position: absolute;
    transform: translate(-50%, -50%);
    width: 220px;
    height: 220px;
    z-index: 50;
    pointer-events: auto;
}

#pieMenuContainer.active {
    display: block;
    animation: popIn 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes popIn {
    from { transform: translate(-50%, -50%) scale(0.6); opacity: 0; }
    to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.pie-center-disc {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 88px;
    height: 88px;
    background: var(--sims-blue-panel);
    border: 2px solid var(--sims-plumbob-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    box-shadow: 0 0 16px rgba(46, 204, 113, 0.4);
    z-index: 2;
}

.pie-slice-btn {
    position: absolute;
    width: 90px;
    height: 44px;
    background: var(--sims-blue-card);
    border: 1.5px solid var(--sims-border);
    backdrop-filter: blur(8px);
    border-radius: 22px;
    color: var(--sims-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    transition: all 0.15s ease;
    z-index: 3;
}

.pie-slice-btn small {
    font-size: 0.62rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.pie-slice-btn:hover {
    background: #1d70b8;
    border-color: var(--sims-plumbob-green);
    transform: scale(1.1);
}

/* ==========================================================================
   MULTIPLAYER CHAT & SYSTEM LOG BOX (TABBED & COLLAPSIBLE)
   ========================================================================== */
/* ==========================================================================
   MULTIPLAYER CHAT & SYSTEM LOG BOX (DRAGGABLE & RESIZABLE)
   ========================================================================== */
#chatContainer {
    position: absolute;
    bottom: 210px; /* Elevated high above the player info card to prevent any overlap */
    left: 18px;
    width: 360px;
    height: 230px;
    min-width: 280px;
    max-width: min(800px, 95vw);
    min-height: 140px;
    max-height: min(650px, 85vh);
    background: rgba(14, 34, 54, 0.94);
    border: 1.5px solid var(--sims-border);
    backdrop-filter: blur(14px);
    border-radius: 16px;
    padding: 8px 10px 10px;
    z-index: 55; /* Higher than #bottomHUD (20) to guarantee it never goes underneath */
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    pointer-events: auto;
    user-select: text;
}

#chatContainer.dragging {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 16px rgba(9, 132, 227, 0.6);
    border-color: #74b9ff;
    transition: none !important;
}

#chatContainer.collapsed {
    height: 38px !important;
    min-height: 38px !important;
    overflow: hidden;
    padding-bottom: 4px;
    background: rgba(14, 34, 54, 0.85);
}

#chatContainer.collapsed .chat-body,
#chatContainer.collapsed .chat-resize-handle {
    display: none !important;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 6px;
    cursor: grab;
    user-select: none;
    touch-action: none;
}

.chat-header:active,
.chat-header.dragging {
    cursor: grabbing;
}

.chat-drag-handle {
    font-size: 1.1rem;
    color: #7f8c8d;
    padding: 0 4px 0 0;
    cursor: grab;
    user-select: none;
    transition: color 0.15s;
}

.chat-header:hover .chat-drag-handle {
    color: #55efc4;
}

.chat-tabs {
    display: flex;
    gap: 4px;
    flex: 1;
}

.chat-tab-btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 3px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #a4b0be;
    cursor: pointer;
    transition: all 0.15s ease;
}

.chat-tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.chat-tab-btn.active {
    color: #fff;
    background: rgba(9, 132, 227, 0.35);
    border-color: rgba(116, 185, 255, 0.5);
    box-shadow: 0 0 8px rgba(9, 132, 227, 0.4);
}

.chat-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.chat-ctrl-btn {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    color: #dfe6e9;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.15s;
}

.chat-ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    transform: scale(1.1);
}

.chat-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    gap: 6px;
}

#chatMessages {
    flex: 1;
    min-height: 60px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.78rem;
    padding-right: 4px;
}

#chatMessages::-webkit-scrollbar {
    width: 4px;
}

#chatMessages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.chat-entry {
    line-height: 1.35;
    word-break: break-word;
    display: flex;
    gap: 5px;
}

.chat-entry strong {
    color: #5dade2;
    flex-shrink: 0;
}

.chat-entry.msg-system strong {
    color: #f1c40f;
}

.chat-entry.msg-system span {
    color: #dfe6e9;
}

.chat-entry.msg-chat strong {
    color: #2ecc71;
}

#chatForm {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

#chatInput {
    flex: 1;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--sims-border);
    color: #fff;
    padding: 6px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    outline: none;
    transition: border-color 0.2s;
}

#chatInput:focus {
    border-color: var(--sims-plumbob-green);
    box-shadow: 0 0 8px rgba(46, 204, 113, 0.3);
}

.chat-send-btn {
    padding: 4px 12px !important;
    font-size: 0.75rem !important;
    background: linear-gradient(135deg, #0984e3, #00cec9) !important;
    border-color: #55efc4 !important;
}

.chat-resize-handle {
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 14px;
    height: 14px;
    cursor: se-resize;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.35);
    user-select: none;
    text-align: center;
    line-height: 14px;
    touch-action: none;
    transition: color 0.15s;
}

.chat-resize-handle:hover {
    color: #55efc4;
}

/* ==========================================================================
   CHARACTER CUSTOMIZER MODAL
   ========================================================================== */
.sims-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 15, 25, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 500;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.sims-modal.active {
    display: flex !important;
    z-index: 500;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.modal-card {
    width: 100%;
    max-width: 440px;
    background: var(--sims-blue-panel);
    border: 2px solid var(--sims-border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 10px;
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--sims-plumbob-green);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.8rem;
    color: #a4c8e8;
}

.form-group input, .form-group select {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--sims-border);
    color: #fff;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.86rem;
    outline: none;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

/* ==========================================================================
   TITLE SCREEN OVERLAY & AUTHENTICATION STYLING
   ========================================================================== */
.title-screen {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at 50% 40%, rgba(20, 55, 90, 0.85) 0%, rgba(6, 18, 32, 0.97) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.title-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.title-content-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 520px;
    width: 90%;
    padding: 40px 30px;
    border-radius: 28px;
    background: rgba(18, 44, 75, 0.7);
    border: 1.5px solid rgba(130, 200, 255, 0.35);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65), 0 0 40px rgba(46, 204, 113, 0.15);
    animation: titleCardPop 0.6s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

@keyframes titleCardPop {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Iconic Animated 3D-styled Plumbob */
.title-plumbob-container {
    position: relative;
    width: 60px;
    height: 90px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.title-plumbob-gem {
    width: 44px;
    height: 74px;
    background: linear-gradient(135deg, #a8ff78 0%, #2ecc71 45%, #15803d 100%);
    clip-path: polygon(50% 0%, 100% 35%, 50% 100%, 0% 35%);
    filter: drop-shadow(0 0 16px rgba(46, 204, 113, 0.85));
    animation: plumbobFloat 2.8s ease-in-out infinite;
}

@keyframes plumbobFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg) scale(1);
        filter: drop-shadow(0 0 16px rgba(46, 204, 113, 0.75));
    }
    50% {
        transform: translateY(-12px) rotate(4deg) scale(1.05);
        filter: drop-shadow(0 0 26px rgba(46, 204, 113, 0.95));
    }
}

.title-plumbob-shadow {
    width: 32px;
    height: 10px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.5) 0%, transparent 70%);
    border-radius: 50%;
    margin-top: 6px;
    animation: plumbobShadow 2.8s ease-in-out infinite;
}

@keyframes plumbobShadow {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(0.7); opacity: 0.3; }
}

.title-game-logo {
    font-size: 2.3rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: #ffffff;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-live-badge {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 12px;
    letter-spacing: 1.5px;
    box-shadow: 0 0 14px rgba(46, 204, 113, 0.6);
}

.title-tagline {
    font-size: 0.88rem;
    color: #b0d4f1;
    margin-bottom: 22px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.title-account-status {
    background: rgba(10, 30, 50, 0.6);
    border: 1px solid rgba(130, 200, 255, 0.25);
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #cde4f7;
    margin-bottom: 24px;
}

.title-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 300px;
    margin-bottom: 26px;
}

.sims-title-btn {
    width: 100%;
    padding: 13px 20px;
    background: rgba(22, 55, 90, 0.9);
    border: 1.5px solid var(--sims-border);
    border-radius: 24px;
    color: #ffffff;
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    transition: all 0.22s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.sims-title-btn:hover {
    background: rgba(35, 90, 145, 0.95);
    border-color: var(--sims-plumbob-green);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(46, 204, 113, 0.25);
}

.sims-title-btn.primary-btn {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    border-color: #55efc4;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.45);
}

.sims-title-btn.primary-btn:hover {
    background: linear-gradient(135deg, #2ecc71 0%, #55efc4 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 28px rgba(46, 204, 113, 0.6);
}

.title-footer-notes {
    font-size: 0.72rem;
    color: #7da5c9;
}

/* Authentication Modal Upgrades */
.auth-modal-card {
    max-width: 440px;
}

.auth-tabs-header {
    display: flex;
    gap: 12px;
}

.auth-tab-btn {
    background: transparent;
    border: none;
    color: #92b8dc;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 4px 10px;
    cursor: pointer;
    border-bottom: 2.5px solid transparent;
    transition: all 0.2s ease;
}

.auth-tab-btn.active {
    color: var(--sims-plumbob-green);
    border-bottom-color: var(--sims-plumbob-green);
}

.auth-alert {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.82rem;
    margin-bottom: 14px;
    text-align: center;
}

.auth-alert.error {
    background: rgba(231, 76, 60, 0.25);
    border: 1px solid rgba(231, 76, 60, 0.6);
    color: #ff9999;
}

.auth-alert.success {
    background: rgba(46, 204, 113, 0.25);
    border: 1px solid rgba(46, 204, 113, 0.6);
    color: #abffcb;
}

.form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.primary-submit-btn {
    width: 100%;
    padding: 10px 16px;
    background: var(--sims-plumbob-green);
    border-color: #27ae60;
    font-size: 0.95rem;
    font-weight: 700;
    justify-content: center;
    border-radius: 14px;
}

.primary-submit-btn:hover {
    background: #27ae60;
    border-color: #55efc4;
}

/* ==========================================================================
   NEIGHBORHOOD WORLD MAP & ONBOARDING STYLING
   ========================================================================== */
.neighborhood-overlay {
    position: fixed;
    inset: 0;
    z-index: 350;
    background: radial-gradient(circle at 50% 15%, #18426d 0%, #07192d 100%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.neighborhood-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    display: none !important;
}

.neighborhood-screen {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 20px 30px;
    box-sizing: border-box;
}

.neighborhood-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 1.5px solid rgba(130, 200, 255, 0.25);
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 12px;
}

.neighborhood-title-group h2 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.neighborhood-subtitle {
    font-size: 0.82rem;
    color: #a0cbf1;
}

.neighborhood-funds-chip {
    background: rgba(10, 30, 50, 0.85);
    border: 1.5px solid #f39c12;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(243, 156, 18, 0.25);
}

.neighborhood-funds-chip strong {
    color: #f39c12;
    font-size: 1.05rem;
}

/* Onboarding Guide Banner */
.onboarding-guide-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.35) 0%, rgba(41, 128, 185, 0.35) 100%);
    border: 1.5px solid rgba(46, 204, 113, 0.6);
    padding: 12px 20px;
    border-radius: 16px;
    margin-bottom: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    animation: bannerPulse 3s ease-in-out infinite alternate;
}

@keyframes bannerPulse {
    from { border-color: rgba(46, 204, 113, 0.4); }
    to { border-color: rgba(85, 239, 196, 0.9); }
}

.onboarding-icon {
    font-size: 1.8rem;
}

.onboarding-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.88rem;
    color: #e2f1fd;
}

/* District Filter Tabs */
.district-filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.district-tab {
    background: rgba(15, 38, 65, 0.8);
    border: 1px solid var(--sims-border);
    color: #b0d4f5;
    padding: 7px 16px;
    border-radius: 18px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.district-tab:hover {
    background: rgba(30, 75, 125, 0.9);
    color: #ffffff;
    border-color: #55efc4;
}

.district-tab.active {
    background: var(--sims-plumbob-green);
    border-color: #55efc4;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.4);
}

/* 20-Lot Grid Container */
.neighborhood-grid-scroll {
    flex: 1;
    overflow-y: auto;
    padding-right: 8px;
}

.neighborhood-lots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    padding-bottom: 24px;
}

/* Individual Lot Card */
.lot-card {
    background: rgba(18, 44, 75, 0.75);
    border: 1.5px solid rgba(130, 200, 255, 0.25);
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.lot-card:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: var(--sims-plumbob-green);
    box-shadow: 0 12px 30px rgba(46, 204, 113, 0.25);
}

.lot-card.owned-by-me {
    border-color: #2ecc71;
    box-shadow: 0 0 20px rgba(46, 204, 113, 0.3);
}

.lot-card.affordable {
    border-color: rgba(46, 204, 113, 0.5);
}

.lot-card.expensive {
    opacity: 0.85;
}

.lot-card-hero {
    height: 90px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 12px;
    position: relative;
}

.district-outskirts {
    background: linear-gradient(135deg, #795548 0%, #2e7d32 100%);
}

.district-suburbs {
    background: linear-gradient(135deg, #27ae60 0%, #2980b9 100%);
}

.district-hilltop {
    background: linear-gradient(135deg, #8e44ad 0%, #2c3e50 100%);
}

.district-civic {
    background: linear-gradient(135deg, #2c3e50 0%, #d35400 100%);
}

.lot-card-badge {
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

.lot-card-badge.for-sale-affordable {
    background: rgba(46, 204, 113, 0.9);
    color: #ffffff;
}

.lot-card-badge.for-sale-expensive {
    background: rgba(52, 73, 94, 0.85);
    color: #bdc3c7;
}

.lot-card-badge.my-home {
    background: #2ecc71;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.8);
}

.lot-card-badge.community {
    background: #2980b9;
    color: #ffffff;
}

.lot-card-badge.resident {
    background: #e67e22;
    color: #ffffff;
}

.lot-district-chip {
    background: rgba(0, 0, 0, 0.5);
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.68rem;
    color: #e2f1fd;
}

.lot-card-content {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
}

.lot-card-title {
    font-size: 0.96rem;
    font-weight: 700;
    color: #ffffff;
}

.lot-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.76rem;
}

.lot-card-desc {
    font-size: 0.76rem;
    color: #9ac2e6;
    line-height: 1.35;
    flex: 1;
    margin: 4px 0;
}

.lot-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 8px;
    margin-top: 4px;
}

.lot-card-footer strong {
    color: #f39c12;
    font-size: 0.92rem;
}

/* Inspector Modal Styling */
.lot-modal-card {
    max-width: 480px;
}

.lot-hero-graphic {
    height: 110px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 14px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px;
    margin-bottom: 12px;
}

.lot-badge-pill {
    background: rgba(0, 0, 0, 0.55);
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 0.8rem;
    color: #fff;
}

.lot-description-text {
    font-size: 0.86rem;
    color: #b8d6f2;
    line-height: 1.4;
    margin-bottom: 14px;
}

.lot-financial-box {
    background: rgba(10, 25, 45, 0.8);
    border: 1px solid var(--sims-border);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.fin-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.84rem;
    color: #c7e0f8;
}

.fin-row.total-row {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 6px;
    font-weight: 700;
}

.lot-ownership-info {
    font-size: 0.84rem;
    color: #92b8dc;
    margin-bottom: 14px;
}

.lot-action-buttons {
    display: flex;
    gap: 10px;
}

/* ==========================================================================
   ONBOARDING DIRECTIVE HUD & QUEST PROGRESSION
   ========================================================================== */
#onboardingDirectiveHUD {
    position: fixed;
    top: 76px;
    left: 20px;
    right: auto;
    bottom: auto;
    margin: 0;
    transform: none !important;
    z-index: 260; /* Higher than #neighborhoodOverlay (z-index 250) */
    pointer-events: auto;
    font-family: 'Inter', -apple-system, sans-serif;
    transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    max-width: 380px;
    width: calc(100vw - 40px);
    box-sizing: border-box;
}

.directive-card {
    background: rgba(14, 34, 61, 0.92);
    border: 1.5px solid rgba(85, 239, 196, 0.55);
    border-radius: 18px;
    padding: 16px 18px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55), 0 0 24px rgba(46, 204, 113, 0.25);
    backdrop-filter: blur(14px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: #ffffff;
    box-sizing: border-box;
    animation: directiveFadeIn 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes directiveFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 500px) {
    #onboardingDirectiveHUD {
        left: 12px;
        top: 70px;
        width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
    }
}

.directive-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.directive-step-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(46, 204, 113, 0.2);
    border: 1px solid rgba(46, 204, 113, 0.65);
    border-radius: 12px;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #55efc4;
}

.directive-pulse-dot {
    width: 8px;
    height: 8px;
    background: #2ecc71;
    border-radius: 50%;
    box-shadow: 0 0 8px #2ecc71;
    animation: directivePulse 1.8s infinite;
}

@keyframes directivePulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.35); opacity: 1; box-shadow: 0 0 12px #55efc4; }
    100% { transform: scale(0.9); opacity: 0.8; }
}

.directive-header-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.directive-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b8d6f2;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.directive-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.directive-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.directive-title-row {
    display: flex;
    flex-direction: column;
}

.directive-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.2px;
}

.directive-subtitle {
    font-size: 0.76rem;
    font-weight: 700;
    color: #82c8ff;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.directive-desc {
    font-size: 0.84rem;
    color: #d2e4f7;
    line-height: 1.4;
    margin: 2px 0 4px;
}

.directive-hint-box {
    background: rgba(0, 0, 0, 0.35);
    border-left: 3px solid #f39c12;
    padding: 6px 10px;
    border-radius: 4px 8px 8px 4px;
    font-size: 0.76rem;
    color: #ffd166;
    display: flex;
    gap: 6px;
    align-items: center;
}

.directive-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 8px;
}

.directive-reward-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.22) 0%, rgba(230, 126, 34, 0.22) 100%);
    border: 1px solid rgba(243, 156, 18, 0.55);
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #f1c40f;
    align-self: flex-start;
}

.directive-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.directive-progress-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 180, 216, 0.22);
    border: 1px solid rgba(0, 180, 216, 0.55);
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #48cae4;
    align-self: flex-start;
}

.directive-action-btn {
    width: 100%;
    padding: 9px 14px;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: 12px;
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(46, 204, 113, 0.45);
    transition: transform 0.2s, box-shadow 0.2s;
}

.directive-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.65);
}

.directive-card.minimized {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    border-radius: 20px;
}

.directive-card.minimized .directive-step-pill {
    background: rgba(46, 204, 113, 0.2);
    border: 1px solid rgba(46, 204, 113, 0.5);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #55efc4;
}

.directive-card.minimized .minimized-title {
    font-size: 0.85rem;
    color: #ffffff;
    font-weight: 700;
}

.directive-card.completed {
    background: rgba(22, 60, 40, 0.92);
    border-color: #2ecc71;
}

.directive-completed-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.directive-completed-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.directive-completed-text strong {
    font-size: 0.95rem;
    color: #55efc4;
}

.directive-completed-text small {
    font-size: 0.74rem;
    color: #a8e6cf;
}

/* Starter recommended pulse in Neighborhood grid */
.lot-card.starter-recommended {
    border: 2px solid #2ecc71;
    box-shadow: 0 0 16px rgba(46, 204, 113, 0.45);
    animation: starterPulse 2s infinite ease-in-out;
}

@keyframes starterPulse {
    0% { box-shadow: 0 0 12px rgba(46, 204, 113, 0.35); }
    50% { box-shadow: 0 0 24px rgba(46, 204, 113, 0.75); border-color: #55efc4; }
    100% { box-shadow: 0 0 12px rgba(46, 204, 113, 0.35); }
}

/* ==========================================================================
   BUILD & BUY MODE STYLING
   ========================================================================== */
.buy-modal-card {
    max-width: 860px;
    width: 92%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}

.buy-header-title h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.buy-header-subtitle {
    font-size: 0.78rem;
    color: #9ac2e6;
}

.buy-funds-badge {
    background: rgba(14, 34, 61, 0.85);
    border: 1px solid #f39c12;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 0.88rem;
    display: flex;
    gap: 6px;
    align-items: center;
}

.buy-funds-badge strong {
    color: #f39c12;
    font-size: 0.95rem;
}

.buy-category-tabs {
    display: flex;
    gap: 8px;
    margin: 14px 0;
    overflow-x: auto;
    padding-bottom: 4px;
}

.buy-tab {
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    color: #d2e4f7;
    padding: 6px 14px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s;
}

.buy-tab:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.buy-tab.active {
    background: linear-gradient(135deg, #e67e22, #d35400);
    border-color: #f39c12;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.4);
}

.buy-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    grid-auto-rows: minmax(290px, auto);
    align-content: start;
    gap: 16px;
    overflow-y: auto;
    max-height: 58vh;
    padding-right: 8px;
    flex: 1;
    min-height: 240px;
}

.buy-item-card {
    background: rgba(14, 34, 61, 0.85);
    border: 1.5px solid rgba(130, 200, 255, 0.25);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 290px;
    height: 100%;
    transition: all 0.22s;
}

.buy-item-card:hover {
    transform: translateY(-3px);
    border-color: #55efc4;
    box-shadow: 0 8px 24px rgba(46, 204, 113, 0.25);
}

.buy-item-card.unaffordable {
    opacity: 0.75;
}

.buy-card-icon-hero {
    height: 80px;
    min-height: 80px;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(20, 50, 85, 0.85), rgba(10, 30, 55, 0.95));
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
}

.buy-item-icon {
    font-size: 2.2rem;
}

.buy-price-tag {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 800;
}

.buy-price-tag.green {
    background: rgba(46, 204, 113, 0.25);
    border: 1px solid #2ecc71;
    color: #55efc4;
}

.buy-price-tag.red {
    background: rgba(231, 76, 60, 0.25);
    border: 1px solid #e74c3c;
    color: #ff7675;
}

.buy-card-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 0 auto;
}

.buy-card-title {
    font-size: 0.92rem;
    color: #ffffff;
    font-weight: 700;
}

.buy-card-motive {
    font-size: 0.74rem;
    font-weight: 700;
    color: #55efc4;
}

.buy-card-desc {
    font-size: 0.74rem;
    color: #b8d6f2;
    line-height: 1.35;
    flex: 1;
    margin: 2px 0 6px;
}

.buy-select-btn {
    margin-top: auto;
    width: 100%;
    padding: 8px;
    font-size: 0.84rem;
    font-weight: 700;
    border-radius: 10px;
    justify-content: center;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    border-color: #55efc4;
}

.buy-select-btn:disabled {
    background: rgba(52, 73, 94, 0.5);
    border-color: rgba(255, 255, 255, 0.15);
    color: #95a5a6;
    cursor: not-allowed;
}

.buy-modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 10px;
    margin-top: 10px;
}

.buy-hint {
    font-size: 0.76rem;
    color: #ffd166;
}

/* Placement Mode Floating HUD */
.placement-controls-hud {
    position: fixed;
    top: 72px;
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
    z-index: 500;
    display: flex;
    align-items: center;
    pointer-events: auto;
}

.placement-hud-card {
    background: rgba(14, 34, 61, 0.94);
    border: 2px solid #55efc4;
    border-radius: 20px;
    padding: 10px 20px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(46, 204, 113, 0.4);
    backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    gap: 16px;
    color: #fff;
    animation: popUpHUD 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes popUpHUD {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.placement-hud-icon {
    font-size: 2rem;
}

.placement-hud-text {
    display: flex;
    flex-direction: column;
}

.placement-hud-text strong {
    font-size: 0.95rem;
    color: #ffffff;
}

.placement-hud-text small {
    font-size: 0.75rem;
    color: #a8e6cf;
}

/* ==========================================================================
   CAREERS & EMPLOYMENT AGENCY STYLING
   ========================================================================== */
.career-modal-card {
    max-width: 820px;
    width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.career-header-title h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
}

.career-header-subtitle {
    font-size: 0.78rem;
    color: #9ac2e6;
}

/* Active Career Hero */
.active-career-hero {
    background: linear-gradient(135deg, rgba(41, 128, 185, 0.35) 0%, rgba(39, 174, 96, 0.35) 100%);
    border: 1.5px solid #55efc4;
    border-radius: 16px;
    padding: 14px 18px;
    margin: 12px 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.active-career-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.active-career-icon {
    font-size: 2.4rem;
}

.active-career-badge {
    background: rgba(46, 204, 113, 0.25);
    border: 1px solid #2ecc71;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.68rem;
    font-weight: 800;
    color: #55efc4;
    text-transform: uppercase;
    display: inline-block;
}

.active-career-details h3 {
    font-size: 1.15rem;
    color: #ffffff;
    margin: 2px 0;
}

.active-career-wage {
    font-size: 0.8rem;
    color: #ffd166;
}

.active-career-right {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 220px;
}

.career-perf-bar-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.career-perf-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: #d2e4f7;
}

.career-perf-label strong {
    color: #55efc4;
}

.career-perf-track {
    height: 8px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    overflow: hidden;
}

.career-perf-fill {
    height: 100%;
    background: linear-gradient(90deg, #f39c12, #2ecc71);
    border-radius: 4px;
    transition: width 0.3s;
}

.active-career-actions {
    display: flex;
    gap: 8px;
}

.career-tracks-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    max-height: 52vh;
    padding-right: 6px;
}

.career-card {
    background: rgba(14, 34, 61, 0.75);
    border: 1.5px solid rgba(130, 200, 255, 0.2);
    border-radius: 16px;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.2s;
}

.career-card:hover {
    border-color: #82c8ff;
    background: rgba(18, 44, 75, 0.85);
}

.career-card.employed {
    border-color: #2ecc71;
    background: rgba(22, 60, 40, 0.7);
}

.career-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.career-card-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.career-icon {
    font-size: 1.8rem;
}

.career-card-title-group h4 {
    font-size: 1.02rem;
    color: #ffffff;
    margin: 0;
}

.career-venue {
    font-size: 0.72rem;
    color: #82c8ff;
}

.career-desc {
    font-size: 0.78rem;
    color: #b8d6f2;
    line-height: 1.35;
    margin: 0;
}

.career-tiers-roadmap {
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.tier-pill {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tier-pill.active-tier {
    border-color: #2ecc71;
    background: rgba(46, 204, 113, 0.15);
}

.tier-level {
    font-size: 0.65rem;
    font-weight: 800;
    color: #82c8ff;
    text-transform: uppercase;
}

.tier-name {
    font-size: 0.76rem;
    font-weight: 700;
    color: #ffffff;
}

.tier-wage {
    font-size: 0.72rem;
    color: #f39c12;
    font-weight: 700;
}

/* HUD Career Chip */
.hud-career-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.74rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 2px;
    width: fit-content;
}

.hud-career-chip.active {
    background: rgba(46, 204, 113, 0.2);
    border: 1px solid rgba(46, 204, 113, 0.6);
    color: #55efc4;
}

.hud-career-chip.unemployed {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #bdc3c7;
}

.hud-career-chip:hover {
    transform: scale(1.04);
}

/* Shift Progress Overlay */
.shift-progress-overlay {
    position: fixed;
    top: 76px;
    right: 20px;
    z-index: 260;
    pointer-events: auto;
}

.shift-card {
    background: rgba(14, 34, 61, 0.94);
    border: 1.5px solid #f39c12;
    border-radius: 18px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    color: #fff;
    min-width: 280px;
    animation: popUpHUD 0.3s ease;
}

.shift-icon {
    font-size: 1.8rem;
}

.shift-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.shift-info strong {
    font-size: 0.88rem;
    color: #ffffff;
}

.shift-info small {
    font-size: 0.72rem;
    color: #ffd166;
}

.shift-bar-track {
    height: 6px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}

.shift-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f39c12, #2ecc71);
    border-radius: 3px;
    transition: width 0.5s linear;
}

/* ==========================================================================
   SIMS TRAVEL & MOVE-IN LOADING SCREEN
   ========================================================================== */
.travel-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #1b3a5b 0%, #081524 85%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.travel-loading-overlay.active {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.travel-loading-backdrop {
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml;utf8,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><g fill="%232ecc71" fill-opacity="0.04"><path d="M20 5 L28 20 L20 35 L12 20 Z"/></g></svg>');
    opacity: 0.8;
}

.travel-loading-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 480px;
    padding: 30px 40px;
    background: rgba(14, 34, 61, 0.9);
    border: 2px solid var(--sims-plumbob-green);
    border-radius: 28px;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.7), 0 0 40px rgba(46, 204, 113, 0.3);
    backdrop-filter: blur(16px);
}

.travel-plumbob-spinner {
    position: relative;
    width: 60px;
    height: 90px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-gem {
    width: 36px;
    height: 72px;
    background: linear-gradient(135deg, #a8ff78 0%, #2ecc71 40%, #16a085 100%);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    filter: drop-shadow(0 0 16px rgba(46, 204, 113, 0.85));
    animation: rotatePlumbobSpinner 2.2s infinite ease-in-out;
}

@keyframes rotatePlumbobSpinner {
    0% { transform: scale(1) rotateY(0deg); }
    50% { transform: scale(1.12) rotateY(180deg); }
    100% { transform: scale(1) rotateY(360deg); }
}

.spinner-halo {
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(46, 204, 113, 0.45) 0%, transparent 70%);
    animation: pulseHalo 1.8s infinite ease-in-out;
}

@keyframes pulseHalo {
    0%, 100% { transform: scale(0.9); opacity: 0.5; }
    50% { transform: scale(1.3); opacity: 0.9; }
}

.travel-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 6px 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.travel-district-pill {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffd166;
    background: rgba(255, 209, 102, 0.15);
    border: 1px solid rgba(255, 209, 102, 0.4);
    border-radius: 14px;
    padding: 3px 12px;
    margin-bottom: 14px;
}

.travel-spline-text {
    font-size: 0.88rem;
    color: #a0c4e2;
    font-style: italic;
    min-height: 22px;
    margin: 0 0 18px 0;
}

.travel-progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(46, 204, 113, 0.3);
    border-radius: 6px;
    overflow: hidden;
}

.travel-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2ecc71, #55efc4);
    box-shadow: 0 0 12px rgba(46, 204, 113, 0.8);
    transition: width 0.12s linear;
}

.travel-pct-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: #55efc4;
    margin-top: 8px;
    letter-spacing: 0.5px;
    text-shadow: 0 0 10px rgba(46, 204, 113, 0.7);
}

/* ==========================================================================
   SIMS VISUAL OVERHEAD CITY MAP
   ========================================================================== */
.map-view-toggle {
    display: flex;
    gap: 6px;
    background: rgba(8, 22, 38, 0.8);
    padding: 4px;
    border-radius: 20px;
    border: 1px solid var(--sims-border);
}

.map-view-toggle .toggle-btn {
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 0.82rem;
    font-weight: 700;
    background: transparent;
    border: none;
    box-shadow: none;
    color: #a0c4e2;
}

.map-view-toggle .toggle-btn.active {
    background: var(--sims-plumbob-green);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(46, 204, 113, 0.4);
}

.city-map-container {
    position: relative;
    width: 100%;
    height: 560px;
    min-height: 560px;
    border-radius: 22px;
    overflow: hidden;
    border: 2px solid var(--sims-border);
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.6), 0 12px 36px rgba(0, 0, 0, 0.5);
    background: #14283f;
    user-select: none;
    margin-bottom: 20px;
}

/* 4 Regional Terrain Belts */
.city-terrain-layer {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
}

.city-biome-band {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    padding-left: 24px;
    border-bottom: 2px dashed rgba(255, 255, 255, 0.1);
}

.city-biome-band:last-child {
    border-bottom: none;
}

.biome-outskirts {
    background: linear-gradient(180deg, #c29567 0%, #aa7c4d 100%);
}

.biome-suburbs {
    background: linear-gradient(180deg, #437a3f 0%, #366633 100%);
}

.biome-hilltop {
    background: linear-gradient(180deg, #3d3b59 0%, #29283f 100%);
}

.biome-civic {
    background: linear-gradient(180deg, #24415c 0%, #182e44 100%);
}

.biome-watermark {
    position: absolute;
    right: 24px;
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.12);
    text-transform: uppercase;
    pointer-events: none;
}

.biome-label-badge {
    position: absolute;
    left: 18px;
    top: 12px;
    font-size: 0.76rem;
    font-weight: 800;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 3px 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    pointer-events: none;
}

/* Road Network */
.city-roads-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

/* Interactive 3D-styled City Lot Pins */
.city-lot-pin {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 5;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.22s cubic-bezier(0.18, 0.89, 0.32, 1.28), filter 0.2s ease;
}

.city-lot-pin:hover {
    transform: translate(-50%, -50%) scale(1.22);
    z-index: 20;
}

.pin-icon-wrap {
    position: relative;
    width: 48px;
    height: 48px;
    background: rgba(14, 34, 61, 0.92);
    border: 2px solid var(--sims-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    transition: all 0.2s;
}

.city-lot-pin:hover .pin-icon-wrap {
    border-color: var(--sims-plumbob-green);
    box-shadow: 0 0 20px rgba(46, 204, 113, 0.7);
}

.city-lot-pin.is-my-home .pin-icon-wrap {
    border-color: #2ecc71;
    box-shadow: 0 0 22px rgba(46, 204, 113, 0.9);
    animation: homePulse 1.8s infinite;
}

@keyframes homePulse {
    0%, 100% { box-shadow: 0 0 14px rgba(46, 204, 113, 0.6); }
    50% { box-shadow: 0 0 28px rgba(46, 204, 113, 1); }
}

.pin-plumbob-crown {
    position: absolute;
    top: -24px;
    font-size: 1.3rem;
    animation: spinFloatCrown 2s infinite ease-in-out;
}

@keyframes spinFloatCrown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.pin-badge-chip {
    margin-top: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
    border-radius: 12px;
    padding: 2px 8px;
    background: rgba(10, 24, 44, 0.9);
    border: 1px solid var(--sims-border);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
}

.city-lot-pin.for-sale-affordable .pin-badge-chip {
    background: rgba(46, 204, 113, 0.9);
    border-color: #55efc4;
    color: #ffffff;
    animation: pulseStarter 1.8s infinite;
}

@keyframes pulseStarter {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.city-lot-pin.for-sale-expensive .pin-badge-chip {
    background: rgba(231, 76, 60, 0.85);
    border-color: #e74c3c;
}

.city-lot-pin.community-venue .pin-badge-chip {
    background: rgba(41, 128, 185, 0.9);
    border-color: #5dade2;
}

.city-lot-pin.resident-occupied .pin-badge-chip {
    background: rgba(243, 156, 18, 0.9);
    border-color: #f39c12;
}

/* Tooltip on pin hover */
.pin-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 25, 45, 0.95);
    border: 1.5px solid var(--sims-plumbob-green);
    border-radius: 12px;
    padding: 6px 12px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.city-lot-pin:hover .pin-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

.pin-tooltip-title {
    font-size: 0.78rem;
    font-weight: 800;
    color: #ffffff;
}

.pin-tooltip-sub {
    font-size: 0.68rem;
    color: #ffd166;
}

/* =========================================================================
   ARCHITECTURAL BUILD MODE DRAWER & CONTROLS
   ========================================================================= */
.build-mode-drawer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(105%);
    width: min(960px, 96vw);
    max-height: 290px;
    background: linear-gradient(180deg, rgba(14, 30, 52, 0.96) 0%, rgba(8, 18, 34, 0.98) 100%);
    border: 2px solid var(--sims-border);
    border-bottom: none;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(46, 204, 113, 0.2);
    backdrop-filter: blur(16px);
    z-index: 450;
    display: flex;
    flex-direction: column;
    transition: transform 0.32s cubic-bezier(0.18, 0.89, 0.32, 1.2), visibility 0.32s;
    padding: 12px 18px;
    box-sizing: border-box;
    pointer-events: none;
    visibility: hidden;
}

.build-mode-drawer.active {
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
    visibility: visible;
}

.build-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
}

.build-drawer-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
}

.build-header-icon {
    font-size: 24px;
    background: rgba(46, 204, 113, 0.2);
    border-radius: 8px;
    padding: 4px;
}

.build-drawer-title strong {
    font-size: 1.05rem;
    display: block;
}

.build-drawer-title small {
    font-size: 0.75rem;
    color: #ffd166;
}

.cutaway-controls-group {
    display: flex;
    gap: 6px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 3px;
}

.cutaway-btn {
    background: transparent;
    border: none;
    color: #bdc3c7;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cutaway-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.cutaway-btn.active {
    background: #27ae60;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.6);
}

.build-close-btn {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid #e74c3c;
    color: #e74c3c;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.build-close-btn:hover {
    background: #e74c3c;
    color: #ffffff;
}

.build-category-tabs {
    display: flex;
    gap: 8px;
    margin: 8px 0;
    overflow-x: auto;
    padding-bottom: 2px;
}

.build-tab-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.build-tab-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: var(--sims-plumbob-green);
}

.build-tab-btn.active {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border-color: #2ecc71;
    box-shadow: 0 0 12px rgba(46, 204, 113, 0.5);
}

.build-tab-btn.danger-tab.active {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    border-color: #e74c3c;
    box-shadow: 0 0 12px rgba(231, 76, 60, 0.5);
}

.build-palette-content {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 6px 4px 10px 4px;
}

.build-style-card {
    min-width: 140px;
    max-width: 155px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 10px 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    transition: all 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.2);
}

.build-style-card:hover {
    transform: translateY(-4px);
    border-color: var(--sims-plumbob-green);
    background: rgba(255, 255, 255, 0.1);
}

.build-style-card.selected {
    border-color: var(--sims-plumbob-green);
    background: rgba(46, 204, 113, 0.15);
    box-shadow: 0 0 16px rgba(46, 204, 113, 0.4);
}

.build-style-card.danger-card.selected {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.15);
    box-shadow: 0 0 16px rgba(231, 76, 60, 0.4);
}

.build-card-swatch {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
}

.build-card-info strong {
    font-size: 0.78rem;
    color: #ffffff;
    display: block;
    line-height: 1.2;
}

.build-card-price {
    font-size: 0.74rem;
    font-weight: 800;
    color: #ffd166;
    margin-top: 3px;
    display: block;
}

.roof-apply-btn {
    margin-top: 4px;
    font-size: 0.72rem;
    padding: 3px 8px;
}

/* ==========================================================================
   TOWNIE SOCIAL PIE MENU & FREE WILL AUTONOMY STYLING
   ========================================================================== */
.pie-slice-btn.social-slice-btn {
    background: linear-gradient(135deg, rgba(28, 40, 56, 0.95), rgba(41, 57, 78, 0.95));
    border-color: #f39c12;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.pie-slice-btn.social-slice-btn:hover {
    background: linear-gradient(135deg, #e67e22, #d35400);
    border-color: #f1c40f;
    box-shadow: 0 0 14px rgba(243, 156, 18, 0.6);
    transform: scale(1.08);
}

#freeWillToggleBtn.free-will-on {
    background: linear-gradient(135deg, #16a085, #1abc9c) !important;
    border-color: #2ecc71 !important;
    color: #ffffff !important;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.4);
}

#freeWillToggleBtn.free-will-off {
    background: linear-gradient(135deg, #5f6368, #3c4043) !important;
    border-color: #70757a !important;
    color: #dadce0 !important;
    opacity: 0.85;
}

.auto-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(46, 204, 113, 0.25);
    border: 1px solid #2ecc71;
    color: #2ecc71;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 8px;
    margin-right: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auto-badge-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    font-size: 0.7rem;
    line-height: 1;
}

/* Comfort Rating Tags in Buy Mode */
.buy-card-tags-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 4px 0 6px;
}

.buy-comfort-chip {
    display: inline-flex;
    align-items: center;
    background: rgba(230, 126, 34, 0.22);
    border: 1px solid rgba(243, 156, 18, 0.6);
    color: #ffd166;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    letter-spacing: 0.3px;
}

/* =========================================================================
   THE SIMS ONLINE (TSO) SKILL SYSTEM & PROGRESSION STYLES
   ========================================================================= */

.floating-skill-xp {
    position: fixed;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(22, 160, 133, 0.95), rgba(46, 204, 113, 0.95));
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 1.05rem;
    font-weight: 800;
    box-shadow: 0 8px 24px rgba(46, 204, 113, 0.5), 0 0 15px rgba(255, 255, 255, 0.6);
    pointer-events: none;
    z-index: 10000;
    animation: floatUpSkill 2.2s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
    border: 1.5px solid #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

@keyframes floatUpSkill {
    0% { opacity: 0; transform: translate(-50%, -20%) scale(0.7); }
    15% { opacity: 1; transform: translate(-50%, -60%) scale(1.1); }
    80% { opacity: 1; transform: translate(-50%, -100%) scale(1.0); }
    100% { opacity: 0; transform: translate(-50%, -140%) scale(0.85); }
}

.skill-levelup-banner {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #16a085, #2ecc71);
    color: #ffffff;
    padding: 16px 24px;
    border-radius: 16px;
    border: 2px solid #a8ffb2;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 25px rgba(46, 204, 113, 0.7);
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 10000;
    animation: bounceInDown 0.5s ease-out;
}

.skill-levelup-banner.fade-out {
    animation: fadeOutUp 0.5s ease-in forwards;
}

.banner-icon {
    font-size: 2.4rem;
    background: rgba(255, 255, 255, 0.2);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-body h3 {
    margin: 0;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    color: #d1ffd6;
}

.banner-body p {
    margin: 3px 0 0;
    font-size: 1.15rem;
}

.banner-reward {
    margin-top: 4px;
    font-size: 0.82rem;
    color: #fff9d2;
    font-weight: 600;
}

/* Skills Modal Card */
.skills-modal-card {
    max-width: 680px;
    width: 95%;
    background: linear-gradient(165deg, #0e1e30, #0a1524);
    border: 1.5px solid rgba(85, 239, 196, 0.35);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
}

.skills-overview-banner {
    display: flex;
    justify-content: space-around;
    background: rgba(16, 38, 62, 0.75);
    border: 1px solid rgba(85, 239, 196, 0.2);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 16px;
}

.overview-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.overview-stat .stat-number {
    font-size: 1.25rem;
    font-weight: 800;
    color: #55efc4;
}

.overview-stat .stat-label {
    font-size: 0.72rem;
    color: #a0c4e2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.skills-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 6px;
}

.skill-card-row {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(22, 48, 76, 0.6);
    border: 1px solid rgba(130, 200, 255, 0.18);
    border-radius: 12px;
    padding: 12px 16px;
    transition: all 0.2s ease;
}

.skill-card-row:hover {
    background: rgba(28, 62, 98, 0.85);
    border-color: rgba(85, 239, 196, 0.5);
    transform: translateY(-1px);
}

.skill-card-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(14, 30, 48, 0.8);
    border: 1px solid rgba(85, 239, 196, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.skill-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.skill-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skill-card-name {
    font-weight: 700;
    font-size: 1rem;
    color: #ffffff;
}

.skill-card-level {
    font-weight: 700;
    font-size: 0.85rem;
    color: #55efc4;
}

.skill-pips-container {
    display: flex;
    gap: 4px;
    margin: 3px 0;
}

.skill-pip {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.skill-pip.filled {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    border-color: #55efc4;
    box-shadow: 0 0 6px rgba(46, 204, 113, 0.5);
}

.skill-xp-bar-wrap {
    height: 4px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 2px;
    overflow: hidden;
}

.skill-xp-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #55efc4);
    transition: width 0.3s ease;
}

.skill-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: #8bb6db;
}

.skills-footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 14px;
}

/* =========================================================================
   MELWOOD BATTLE COLISEUM & RPG AUTO-BATTLER STYLES
   ========================================================================= */

.coliseum-modal-card {
    max-width: 980px;
    width: 96%;
    background: linear-gradient(170deg, #18132b, #0f0c1c);
    border: 1.5px solid rgba(231, 76, 60, 0.4);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.9), 0 0 35px rgba(231, 76, 60, 0.25);
}

.coliseum-header {
    border-bottom: 1.5px solid rgba(231, 76, 60, 0.3);
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.coliseum-crest {
    font-size: 2.2rem;
    filter: drop-shadow(0 0 10px rgba(231, 76, 60, 0.7));
}

.coliseum-header-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-stat-pill {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid rgba(231, 76, 60, 0.5);
    color: #ffd2cc;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.coliseum-body-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 18px;
    margin-top: 16px;
}

@media (max-width: 860px) {
    .coliseum-body-grid {
        grid-template-columns: 1fr;
    }
}

.section-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.section-title-bar h3 {
    margin: 0;
    font-size: 0.78rem;
    letter-spacing: 1px;
    color: #e67e22;
}

.coliseum-party-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.coliseum-party-slot {
    background: rgba(35, 27, 58, 0.75);
    border: 1.5px solid rgba(155, 89, 182, 0.35);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    transition: all 0.2s ease;
}

.coliseum-party-slot:hover {
    border-color: rgba(231, 76, 60, 0.6);
    background: rgba(45, 35, 75, 0.9);
}

.coliseum-party-slot.empty {
    align-items: center;
    justify-content: center;
    min-height: 90px;
    border-style: dashed;
    cursor: pointer;
}

.slot-role-tag {
    font-size: 0.66rem;
    font-weight: 800;
    color: #ffd700;
    letter-spacing: 0.8px;
}

.slot-avatar {
    position: absolute;
    right: 14px;
    top: 12px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid #55efc4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.slot-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff;
}

.slot-title {
    font-size: 0.72rem;
    color: #d1b8ff;
}

.slot-stats-row {
    display: flex;
    gap: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffd8bf;
    margin-top: 3px;
}

.slot-ultimate-badge {
    background: rgba(241, 196, 15, 0.15);
    border: 1px solid rgba(241, 196, 15, 0.4);
    color: #f1c40f;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    margin-top: 4px;
    display: inline-block;
    max-width: fit-content;
}

.party-leader-badge {
    font-size: 0.7rem;
    color: #2ecc71;
    font-weight: 700;
    margin-top: 4px;
}

.slot-swap-btn {
    align-self: flex-start;
    padding: 3px 10px;
    font-size: 0.72rem;
    margin-top: 4px;
}

/* Relics */
.relic-inventory-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 160px;
    overflow-y: auto;
}

.relic-item-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(30, 24, 50, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 6px 10px;
}

.relic-icon {
    font-size: 1.3rem;
}

.relic-name {
    font-weight: 700;
    font-size: 0.78rem;
    color: #ffffff;
}

.relic-desc {
    font-size: 0.68rem;
    color: #55efc4;
}

/* Arena View & Canvas */
.coliseum-arena-view {
    background: #141124;
    border: 1.5px solid rgba(155, 89, 182, 0.4);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.arena-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(28, 22, 48, 0.9);
    padding: 8px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.arena-stage-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffd700;
}

.arena-stage-field {
    position: relative;
    width: 100%;
    height: 340px;
    background: #1e1a2f;
    display: flex;
    align-items: center;
    justify-content: center;
}

#battlerCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

.arena-announce-overlay {
    position: absolute;
    inset: 0;
    background: rgba(14, 11, 24, 0.88);
    backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    z-index: 10;
    animation: fadeIn 0.3s ease;
}

.arena-announce-overlay.victory h2 {
    color: #2ecc71;
    font-size: 2rem;
    margin: 0;
    text-shadow: 0 0 20px rgba(46, 204, 113, 0.8);
}

.arena-announce-overlay.defeat h2 {
    color: #e74c3c;
    font-size: 2rem;
    margin: 0;
    text-shadow: 0 0 20px rgba(231, 76, 60, 0.8);
}

.arena-announce-overlay p {
    color: #ffffff;
    font-size: 1rem;
    margin: 10px 0 18px;
    max-width: 420px;
}

/* Campaign Stages Scroll */
.campaign-stages-scroll {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
    max-height: 160px;
    overflow-y: auto;
    padding-right: 4px;
}

.campaign-stage-card {
    background: rgba(30, 24, 50, 0.7);
    border: 1px solid rgba(155, 89, 182, 0.3);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.campaign-stage-card.locked {
    opacity: 0.5;
    filter: grayscale(0.8);
}

.campaign-stage-card.active-stage {
    border-color: #ffd700;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.25);
}

.stage-num-badge {
    font-size: 0.65rem;
    font-weight: 800;
    color: #e67e22;
    letter-spacing: 0.8px;
}

.stage-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #ffffff;
}

.stage-enemies {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 2px 0;
}

.enemy-pill {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid rgba(231, 76, 60, 0.4);
    font-size: 0.66rem;
    padding: 2px 6px;
    border-radius: 4px;
    color: #ffccd2;
}

.stage-rewards {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    font-weight: 700;
    color: #ffd700;
}

.stage-battle-btn {
    margin-top: 4px;
    padding: 4px 10px;
    font-size: 0.75rem;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-color: #f39c12;
}

/* Hero Picker Dialog */
.hero-picker-modal .modal-card {
    max-width: 500px;
    background: #18132b;
    border-color: #9b59b6;
}

.candidate-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 420px;
    overflow-y: auto;
}

.hero-candidate-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(35, 27, 58, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hero-candidate-card:hover {
    background: rgba(55, 42, 90, 0.9);
    border-color: #55efc4;
}

.candidate-avatar {
    font-size: 1.8rem;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.candidate-info {
    flex: 1;
}

.candidate-role {
    font-size: 0.72rem;
    color: #ffd700;
}

.candidate-desc {
    font-size: 0.68rem;
    color: #d1b8ff;
}

/* =========================================================================
   COMMERCIAL ECONOMY, VIP DIAMOND STORE & WATCH AD STYLES
   ========================================================================= */

.sim-diamonds-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(142, 68, 173, 0.35);
    border: 1px solid rgba(187, 143, 206, 0.7);
    color: #f5b7b1;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 2px;
}

.sim-diamonds-badge:hover {
    background: rgba(142, 68, 173, 0.65);
    border-color: #ffd700;
    transform: scale(1.04);
}

.vip-modal-card {
    max-width: 860px;
    width: 95%;
    background: linear-gradient(165deg, #1b112c, #0d0817);
    border: 1.5px solid rgba(187, 143, 206, 0.4);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(142, 68, 173, 0.3);
}

.vip-header {
    border-bottom: 1.5px solid rgba(187, 143, 206, 0.25);
    padding-bottom: 12px;
}

.diamond-sparkle {
    font-size: 2.2rem;
    filter: drop-shadow(0 0 10px rgba(187, 143, 206, 0.8));
}

.header-diamond-pill {
    background: rgba(142, 68, 173, 0.25);
    border: 1px solid rgba(187, 143, 206, 0.5);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 18px;
}

/* Sponsor Ad Banner */
.sponsor-ad-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.2), rgba(243, 156, 18, 0.15));
    border: 1.5px solid rgba(243, 156, 18, 0.5);
    border-radius: 14px;
    padding: 12px 18px;
    margin-top: 14px;
}

.sponsor-banner-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.tv-broadcast-icon {
    font-size: 2.2rem;
}

.sponsor-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffd700;
}

.sponsor-desc {
    font-size: 0.78rem;
    color: #ffffff;
    margin-top: 2px;
}

.sponsor-watch-btn {
    background: linear-gradient(135deg, #e67e22, #d35400);
    border-color: #f39c12;
    padding: 8px 18px;
    font-weight: 800;
    white-space: nowrap;
}

/* 7-Day Streak Calendar */
.streak-cards-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-top: 8px;
}

@media (max-width: 760px) {
    .streak-cards-row {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}

.streak-card {
    background: rgba(35, 24, 55, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 8px 6px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.streak-card.current {
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.35);
    background: rgba(55, 38, 88, 0.9);
}

.streak-card.claimed {
    opacity: 0.6;
    border-color: #2ecc71;
}

.streak-day-tag {
    font-size: 0.65rem;
    font-weight: 800;
    color: #a894cc;
}

.streak-icon {
    font-size: 1.4rem;
}

.streak-reward-text {
    font-size: 0.7rem;
    font-weight: 700;
    color: #ffffff;
}

.claim-streak-btn {
    padding: 3px 8px;
    font-size: 0.68rem;
    background: #27ae60;
    border-color: #2ecc71;
    margin-top: 2px;
}

.claimed-check {
    color: #2ecc71;
    font-weight: 800;
}

/* VIP Catalog */
.vip-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
    max-height: 220px;
    overflow-y: auto;
    margin-top: 8px;
    padding-right: 4px;
}

.vip-store-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(30, 20, 50, 0.7);
    border: 1px solid rgba(187, 143, 206, 0.25);
    border-radius: 10px;
    padding: 10px 12px;
}

.vip-card-icon {
    font-size: 1.8rem;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vip-card-info {
    flex: 1;
}

.vip-card-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: #ffffff;
}

.vip-card-type {
    font-size: 0.68rem;
    color: #ffd700;
}

.vip-card-desc {
    font-size: 0.66rem;
    color: #d1b8ff;
}

.vip-purchase-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #8e44ad, #6c3483);
    border-color: #bb8fce;
    white-space: nowrap;
}

/* Sponsor Ad Player Modal */
.ad-player-box {
    position: relative;
    max-width: 480px;
    width: 90%;
    background: #0d0a17;
    border: 2px solid #e67e22;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95), 0 0 35px rgba(230, 126, 34, 0.5);
    overflow: hidden;
    z-index: 10001;
    animation: bounceInDown 0.4s ease;
}

.ad-player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #191228;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ad-badge {
    font-size: 0.68rem;
    font-weight: 800;
    color: #ffd700;
    letter-spacing: 1px;
}

.ad-timer {
    font-size: 0.78rem;
    font-weight: 700;
    color: #e67e22;
}

.ad-player-screen {
    padding: 30px 20px;
    text-align: center;
    background: linear-gradient(180deg, #1b122e, #0e0a1a);
}

.ad-brand-icon {
    font-size: 3.5rem;
    margin-bottom: 8px;
    animation: pulseGlow 1.5s infinite alternate;
}

.ad-brand-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffffff;
}

.ad-brand-tagline {
    font-size: 0.85rem;
    color: #f1c40f;
    font-style: italic;
    margin: 8px auto 20px;
    max-width: 380px;
}

.ad-progress-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    max-width: 360px;
    margin: 0 auto;
}

.ad-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #e67e22, #f1c40f);
    transition: width 1s linear;
}

.ad-player-footer {
    padding: 14px 18px;
    background: #140e21;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.ad-reward-preview {
    font-size: 0.78rem;
    color: #55efc4;
    font-weight: 700;
}

/* =========================================================================
   SOCIAL MMO & LOT PRESTIGE STYLES
   ========================================================================= */

.lot-prestige-btn {
    background: rgba(241, 196, 15, 0.25);
    border: 1px solid rgba(241, 196, 15, 0.6);
    color: #fff2a3;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lot-prestige-btn:hover {
    background: rgba(241, 196, 15, 0.5);
    border-color: #ffd700;
    transform: scale(1.04);
}

.lot-revenue-btn {
    background: rgba(46, 204, 113, 0.3);
    border: 1px solid rgba(46, 204, 113, 0.7);
    color: #c8ffdb;
    font-size: 0.74rem;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 12px;
    cursor: pointer;
    animation: pulseGlow 2s infinite alternate;
}

/* Trading Post Marketplace */
.market-modal-card {
    max-width: 820px;
    width: 95%;
    background: linear-gradient(165deg, #102638, #0a1724);
    border: 1.5px solid rgba(46, 204, 113, 0.35);
}

.market-tabs-row {
    display: flex;
    gap: 8px;
    margin: 12px 0;
    align-items: center;
}

.market-items-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 4px;
}

.market-item-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(18, 42, 65, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 10px 14px;
}

.market-item-icon {
    font-size: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.market-item-details {
    flex: 1;
}

.market-item-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff;
}

.market-item-seller {
    font-size: 0.72rem;
    color: #8bb6db;
}

.market-item-desc {
    font-size: 0.72rem;
    color: #55efc4;
    margin-top: 2px;
}

.market-item-buy-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.market-item-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: #ffd700;
}

.market-buy-btn {
    padding: 4px 12px;
    font-size: 0.75rem;
    background: #27ae60;
    border-color: #2ecc71;
}

/* =========================================================================
   ENDGAME WORLD BOSS RAID STYLES
   ========================================================================= */

.world-raid-modal-card {
    max-width: 800px;
    width: 95%;
    background: linear-gradient(165deg, #2b0d0d, #140505);
    border: 2px solid #e74c3c;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.95), 0 0 40px rgba(231, 76, 60, 0.5);
}

.raid-boss-icon {
    font-size: 2.4rem;
}

.boss-health-banner {
    background: rgba(30, 8, 8, 0.85);
    border: 1px solid rgba(231, 76, 60, 0.4);
    border-radius: 12px;
    padding: 14px;
    margin-top: 14px;
}

.boss-hp-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    font-weight: 800;
    color: #ffccd2;
    margin-bottom: 6px;
}

.boss-hp-track {
    height: 14px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 7px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.boss-hp-fill {
    height: 100%;
    background: linear-gradient(90deg, #c0392b, #e74c3c, #f39c12);
    transition: width 0.3s ease;
}

.boss-phases-tags {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.phase-tag {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid rgba(231, 76, 60, 0.5);
    font-size: 0.72rem;
    font-weight: 700;
    color: #ffccd2;
    padding: 3px 8px;
    border-radius: 6px;
}

.raid-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}

@media (max-width: 680px) {
    .raid-content-grid {
        grid-template-columns: 1fr;
    }
}

.raid-reward-box {
    background: rgba(20, 6, 6, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
}

.raid-requirements-note {
    font-size: 0.72rem;
    color: #f1c40f;
    margin-top: 8px;
}

.raid-col-action {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(20, 6, 6, 0.8);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 10px;
    padding: 16px;
}

.raid-strike-btn {
    margin-top: 14px;
    padding: 10px;
    font-size: 0.95rem;
    font-weight: 800;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-color: #ffd700;
}

/* ==========================================================================
   SIMPHONE OS & SOCIAL RELATIONSHIPS MANAGEMENT MODAL
   ========================================================================== */
#simPhoneModal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(8, 12, 20, 0.75);
    backdrop-filter: blur(8px);
}

.phone-chassis {
    width: 390px;
    max-width: 95vw;
    height: 640px;
    max-height: 90vh;
    background: linear-gradient(165deg, #1e272e 0%, #0f1419 100%);
    border: 3.5px solid #3d4a58;
    border-radius: 40px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.1), inset 0 0 16px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #f1f2f6;
    font-family: inherit;
    position: relative;
    animation: phonePopUp 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes phonePopUp {
    from { opacity: 0; transform: scale(0.88) translateY(30px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Phone Top Speaker & Camera Notch */
.phone-notch {
    height: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding-top: 6px;
}

.notch-speaker {
    width: 46px;
    height: 4px;
    background: #2f3640;
    border-radius: 3px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8);
}

.notch-camera {
    width: 7px;
    height: 7px;
    background: #1e272e;
    border: 1px solid #353b48;
    border-radius: 50%;
}

/* Phone Status Bar */
.phone-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 18px 6px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #a4b0be;
    letter-spacing: 0.3px;
}

.phone-status-icons {
    display: flex;
    align-items: center;
    gap: 7px;
}

/* Phone App Header */
.phone-app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(9, 132, 227, 0.25), rgba(108, 92, 231, 0.25));
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.phone-app-header h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #74b9ff;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.phone-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    color: #dfe6e9;
    font-weight: bold;
    cursor: pointer;
    transition: 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phone-close-btn:hover {
    background: #e74c3c;
    color: #fff;
}

/* Phone Tabs */
.phone-tabs {
    display: flex;
    background: rgba(15, 20, 25, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.phone-tab-btn {
    flex: 1;
    padding: 10px 4px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #a4b0be;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.phone-tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
}

.phone-tab-btn.active {
    color: #0984e3;
    border-bottom-color: #0984e3;
    background: rgba(9, 132, 227, 0.1);
}

.tab-badge {
    background: #e74c3c;
    color: #fff;
    border-radius: 10px;
    padding: 1px 6px;
    font-size: 0.65rem;
    font-weight: 800;
}

/* App Body & Scrollable Area */
.phone-app-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.phone-app-body::-webkit-scrollbar {
    width: 5px;
}

.phone-app-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

/* Contact Cards */
.phone-contacts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.phone-contact-card {
    background: rgba(30, 39, 46, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: 42px 1fr;
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 8px;
    align-items: center;
    transition: transform 0.15s, border-color 0.15s;
}

.phone-contact-card:hover {
    border-color: rgba(9, 132, 227, 0.4);
    transform: translateY(-1px);
}

.contact-avatar-badge {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-name-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-name {
    font-size: 0.88rem;
    color: #fff;
}

.contact-tier-badge {
    font-size: 0.68rem;
    font-weight: 700;
}

.contact-sub {
    font-size: 0.7rem;
    color: #a4b0be;
}

.friendship-track {
    width: 100%;
    height: 5px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}

.friendship-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.contact-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 6px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.phone-btn {
    flex: 1;
    padding: 5px 6px;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: 0.15s;
    text-align: center;
}

.phone-call-btn {
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: #fff;
    border-color: #55efc4;
}

.phone-call-btn:hover {
    filter: brightness(1.15);
}

.phone-text-btn {
    background: linear-gradient(135deg, #0984e3, #74b9ff);
    color: #fff;
    border-color: #74b9ff;
}

.phone-text-btn:hover {
    filter: brightness(1.15);
}

.phone-invite-btn {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: #fff;
    border-color: #a29bfe;
}

.phone-invite-btn:hover:not(:disabled) {
    filter: brightness(1.15);
}

.phone-invite-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Visitors Management Tab */
.phone-visitors-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.visitor-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.3);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.78rem;
    color: #55efc4;
}

.dismiss-all-btn {
    padding: 4px 8px;
    font-size: 0.7rem;
    background: #e74c3c;
    border-color: #c0392b;
}

.phone-visitor-card {
    background: rgba(30, 39, 46, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.visitor-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #2f3640;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.visitor-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.visitor-info strong {
    font-size: 0.85rem;
    color: #fff;
}

.visitor-info small {
    font-size: 0.7rem;
    color: #a4b0be;
}

.visitor-status {
    font-size: 0.66rem;
    color: #f1c40f;
}

.dismiss-visitor-btn {
    padding: 5px 10px;
    font-size: 0.72rem;
    background: linear-gradient(135deg, #d63031, #c0392b);
    border-color: #e74c3c;
}

/* Empty State */
.phone-empty-state {
    text-align: center;
    padding: 40px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.phone-empty-state .empty-icon {
    font-size: 2.8rem;
    opacity: 0.8;
}

.phone-empty-state h3 {
    margin: 0;
    color: #dfe6e9;
    font-size: 1.05rem;
}

.phone-empty-state p {
    margin: 0;
    color: #a4b0be;
    font-size: 0.8rem;
    line-height: 1.4;
    max-width: 280px;
}

/* Quick Services Tab */
.phone-services-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-card {
    background: rgba(30, 39, 46, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 12px;
    display: grid;
    grid-template-columns: 44px 1fr;
    column-gap: 10px;
    row-gap: 8px;
}

.service-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.service-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.service-info strong {
    font-size: 0.9rem;
    color: #fff;
}

.service-info p {
    margin: 0;
    font-size: 0.72rem;
    color: #a4b0be;
    line-height: 1.35;
}

.service-price {
    font-weight: 800;
    color: #2ecc71;
    font-size: 0.82rem;
    margin-top: 4px;
}

.service-order-btn {
    grid-column: 1 / -1;
    padding: 8px;
    font-size: 0.82rem;
    font-weight: 800;
    background: linear-gradient(135deg, #0984e3, #00cec9);
    border-color: #55efc4;
}

/* ==========================================================================
   FEATURE 1: CULINARY ARTS & RECIPE COOKBOOK SYSTEM
   ========================================================================== */
.cooking-modal-card {
    max-width: 680px;
    width: 94vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(145deg, rgba(22, 33, 44, 0.96), rgba(15, 23, 30, 0.98));
    border: 2px solid rgba(243, 156, 18, 0.4);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8), 0 0 32px rgba(243, 156, 18, 0.15);
    border-radius: 20px;
    overflow: hidden;
}

.cooking-header-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.2), rgba(211, 84, 0, 0.1));
    padding: 12px 18px;
    border-bottom: 1px solid rgba(243, 156, 18, 0.25);
    gap: 12px;
    flex-wrap: wrap;
}

.kitchen-stations-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.kitchen-station-chip {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.3);
    color: #94a3b8;
    transition: all 0.2s ease;
}

.kitchen-station-chip.active {
    background: rgba(46, 204, 113, 0.18);
    color: #2ecc71;
    border-color: rgba(46, 204, 113, 0.4);
}

.kitchen-station-chip.missing {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

.cooking-skill-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #f39c12;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 12px;
    border-radius: 12px;
    border: 1px solid rgba(243, 156, 18, 0.3);
}

.cooking-body-scroll {
    overflow-y: auto;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recipe-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 12px 14px;
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 14px;
    align-items: center;
    transition: all 0.2s ease;
}

.recipe-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(243, 156, 18, 0.4);
    transform: translateY(-2px);
}

.recipe-card.locked {
    opacity: 0.55;
    filter: grayscale(0.5);
    border-color: rgba(255, 255, 255, 0.05);
}

.recipe-card.locked:hover {
    transform: none;
}

.recipe-icon-box {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.2), rgba(230, 126, 34, 0.1));
    border: 1.5px solid rgba(243, 156, 18, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.recipe-details-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.recipe-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.recipe-title-text {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.recipe-level-pill {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 8px;
    background: rgba(243, 156, 18, 0.18);
    color: #f39c12;
    border: 1px solid rgba(243, 156, 18, 0.3);
}

.recipe-desc-text {
    font-size: 0.74rem;
    color: #cbd5e1;
    line-height: 1.3;
}

.recipe-tools-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
}

.recipe-tools-title {
    font-size: 0.68rem;
    color: #94a3b8;
    font-weight: 700;
}

.recipe-tool-pill {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.recipe-tool-pill.has-tool {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.recipe-tool-pill.missing-tool {
    background: rgba(239, 68, 68, 0.18);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.recipe-card.tools-missing {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.04);
}

.recipe-motive-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

.recipe-motive-pill {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 6px;
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.25);
}

.recipe-action-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.recipe-cost-label {
    font-size: 0.95rem;
    font-weight: 800;
    color: #2ecc71;
}

.cook-recipe-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 800;
    background: linear-gradient(135deg, #e67e22, #d35400);
    border-color: #f39c12;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.cook-recipe-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    transform: scale(1.04);
}

.cook-recipe-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #4a5568;
    border-color: #718096;
}

/* ==========================================================================
   FEATURE 2: SIMRADIO & STEREO JUKEBOX TUNER
   ========================================================================== */
.radio-tuner-card {
    max-width: 520px;
    width: 92vw;
    background: linear-gradient(145deg, #2b1d0c, #160f06);
    border: 3px solid #8d5524;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), inset 0 2px 4px rgba(255, 255, 255, 0.15);
    padding: 20px;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.radio-faceplate {
    background: linear-gradient(180deg, #1c1308, #2a1b0b);
    border: 2px solid #5a3818;
    border-radius: 16px;
    padding: 16px;
    box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-dial-window {
    background: #0d0a05;
    border: 2px solid #3d2610;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: inset 0 0 16px rgba(255, 177, 66, 0.15);
}

.radio-station-display {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.radio-station-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffb142;
    text-shadow: 0 0 10px rgba(255, 177, 66, 0.5);
}

.radio-station-sub {
    font-size: 0.74rem;
    color: #d1ccc0;
}

.eq-visualizer {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 32px;
    padding: 4px;
}

.eq-bar {
    width: 6px;
    background: #ffb142;
    border-radius: 3px;
    height: 4px;
    transition: height 0.15s ease;
}

.eq-bar.active {
    animation: eqBounce 0.5s infinite alternate ease-in-out;
}

.eq-bar:nth-child(1) { animation-delay: 0.1s; }
.eq-bar:nth-child(2) { animation-delay: 0.3s; }
.eq-bar:nth-child(3) { animation-delay: 0.05s; }
.eq-bar:nth-child(4) { animation-delay: 0.25s; }
.eq-bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes eqBounce {
    0% { height: 6px; }
    50% { height: 28px; }
    100% { height: 14px; }
}

.radio-stations-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.radio-station-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 10px 12px;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.radio-station-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: #ffb142;
    transform: translateY(-2px);
}

.radio-station-btn.active {
    background: linear-gradient(135deg, rgba(255, 177, 66, 0.3), rgba(204, 142, 53, 0.2));
    border-color: #ffb142;
    box-shadow: 0 0 12px rgba(255, 177, 66, 0.4);
    color: #fffa65;
}

.radio-station-btn.turn-off {
    grid-column: 1 / -1;
    justify-content: center;
    background: rgba(235, 77, 75, 0.15);
    border-color: rgba(235, 77, 75, 0.35);
    color: #ff7979;
}

.radio-station-btn.turn-off:hover {
    background: rgba(235, 77, 75, 0.3);
    border-color: #eb4d4b;
}

/* ==========================================================================
   FEATURE 3: 📷 PHOTO MODE & MEMORIES ALBUM
   ========================================================================== */
.photo-mode-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.6);
}

.viewfinder-brackets {
    position: absolute;
    top: 24px;
    left: 24px;
    right: 24px;
    bottom: 96px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    pointer-events: none;
}

.bracket {
    position: absolute;
    width: 32px;
    height: 32px;
    border-color: rgba(255, 255, 255, 0.85);
    border-style: solid;
}

.bracket.top-left {
    top: 0;
    left: 0;
    border-width: 3px 0 0 3px;
}

.bracket.top-right {
    top: 0;
    right: 0;
    border-width: 3px 3px 0 0;
}

.bracket.bottom-left {
    bottom: 0;
    left: 0;
    border-width: 0 0 3px 3px;
}

.bracket.bottom-right {
    bottom: 0;
    right: 0;
    border-width: 0 3px 3px 0;
}

.viewfinder-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 33.333% 33.333%;
    display: block;
}

.viewfinder-header-info {
    position: absolute;
    top: 14px;
    left: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.simcam-lot-pill {
    background: rgba(0, 0, 0, 0.5);
    padding: 3px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.photo-mode-bottom-bar {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(15, 23, 42, 0.85);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(16px);
    padding: 8px 22px;
    border-radius: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    pointer-events: auto;
}

.photo-mode-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 14px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.photo-mode-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.photo-mode-btn.exit-photo-btn {
    background: rgba(235, 77, 75, 0.2);
    border-color: rgba(235, 77, 75, 0.5);
    color: #ff7675;
}

.photo-mode-btn.exit-photo-btn:hover {
    background: rgba(235, 77, 75, 0.4);
}

.photo-shutter-btn {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: #ffffff;
    border: 4px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.photo-shutter-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.8);
}

.photo-shutter-btn:active {
    transform: scale(0.94);
}

.shutter-inner-ring {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 3px solid #0f172a;
    background: #f8fafc;
}

/* Flash overlay */
.photo-flash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #ffffff;
    opacity: 0;
    pointer-events: none;
    z-index: 2000;
    transition: opacity 0.08s ease-out;
}

.photo-flash-overlay.flashing {
    opacity: 0.95;
    transition: none;
}

/* Photo Memories Album Gallery Modal */
.memories-modal-card {
    max-width: 820px;
    width: 95vw;
    max-height: 88vh;
    background: linear-gradient(145deg, rgba(20, 24, 33, 0.96), rgba(12, 16, 22, 0.98));
    border: 2px solid rgba(224, 86, 253, 0.4);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 32px rgba(224, 86, 253, 0.15);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.memories-gallery-scroll {
    overflow-y: auto;
    padding: 18px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.memory-polaroid-card {
    background: #fff;
    border-radius: 12px;
    padding: 10px 10px 14px 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    color: #2d3436;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.memory-polaroid-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
}

.memory-thumbnail-wrap {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    cursor: pointer;
}

.memory-thumbnail-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.memory-meta-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.memory-lot-title {
    font-size: 0.82rem;
    font-weight: 800;
    color: #0f172a;
}

.memory-timestamp {
    font-size: 0.68rem;
    color: #64748b;
}

.memory-actions-row {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.memory-action-btn {
    flex: 1;
    padding: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s;
}

.memory-action-btn:hover {
    opacity: 0.85;
}

.download-memory-btn {
    background: #0984e3;
    color: #fff;
}

.delete-memory-btn {
    background: #eb4d4b;
    color: #fff;
}

.memories-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.memories-empty-icon {
    font-size: 3.5rem;
}

/* ============================================================
   IN-GAME SCREENSHOT / PHOTO LIGHTBOX VIEWER MODAL
   ============================================================ */
.screenshot-lightbox-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 120000 !important;
    background: rgba(3, 7, 18, 0.94) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    cursor: pointer;
}

.screenshot-lightbox-modal.active {
    display: flex !important;
}

.screenshot-lightbox-container {
    max-width: 1040px;
    width: 95vw;
    max-height: 94vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(155deg, rgba(18, 24, 38, 0.98), rgba(9, 13, 22, 0.99));
    border: 2px solid rgba(0, 180, 216, 0.55);
    border-radius: 20px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9), 0 0 40px rgba(0, 180, 216, 0.25);
    overflow: hidden;
    cursor: default;
    animation: zoomLightboxIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes zoomLightboxIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.screenshot-lightbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: rgba(0, 0, 0, 0.45);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    gap: 12px;
}

.screenshot-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.screenshot-lot-pill {
    font-weight: 800;
    font-size: 0.95rem;
    color: #f8fafc;
    letter-spacing: -0.2px;
}

.screenshot-time-pill {
    font-size: 0.8rem;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.08);
    padding: 3px 8px;
    border-radius: 6px;
}

.screenshot-counter-pill {
    font-size: 0.78rem;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 3px 10px;
    border-radius: 12px;
}

.screenshot-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid #ef4444;
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    flex-shrink: 0;
}

.screenshot-close-btn:hover {
    background: #ef4444;
    transform: scale(1.12);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.75);
}

.screenshot-close-btn:active {
    transform: scale(0.96);
}

.screenshot-image-frame {
    position: relative;
    flex: 1;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: #000;
    overflow: hidden;
    user-select: none;
}

.screenshot-lightbox-img {
    max-width: 100%;
    max-height: 68vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.85);
    display: block;
}

.screenshot-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.8);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 2.2rem;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
    z-index: 10;
}

.screenshot-nav-btn:hover {
    background: rgba(0, 180, 216, 0.9);
    border-color: #00b4d8;
    transform: translateY(-50%) scale(1.12);
    box-shadow: 0 0 20px rgba(0, 180, 216, 0.6);
}

.screenshot-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.screenshot-nav-btn.prev-btn {
    left: 20px;
}

.screenshot-nav-btn.next-btn {
    right: 20px;
}

.screenshot-lightbox-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: rgba(0, 0, 0, 0.45);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    gap: 12px;
    flex-wrap: wrap;
}

.screenshot-footer-left,
.screenshot-footer-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.screenshot-action-btn {
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
}

.screenshot-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.screenshot-action-btn:active {
    transform: translateY(0);
}

.screenshot-action-btn.back-album-btn {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}
.screenshot-action-btn.back-album-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.screenshot-action-btn.download-btn {
    background: #0984e3;
    border-color: #74b9ff;
}
.screenshot-action-btn.download-btn:hover {
    background: #00cec9;
}

.screenshot-action-btn.delete-btn {
    background: rgba(235, 77, 75, 0.25);
    border-color: #eb4d4b;
    color: #ff7675;
}
.screenshot-action-btn.delete-btn:hover {
    background: #eb4d4b;
    color: #fff;
}

.screenshot-action-btn.close-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-color: #ff7979;
    font-weight: 800;
}
.screenshot-action-btn.close-btn:hover {
    background: linear-gradient(135deg, #ff6b6b, #ee5253);
    box-shadow: 0 0 16px rgba(231, 76, 60, 0.6);
}

/* ============================================================
   WEATHER & ATMOSPHERIC SYSTEM HUD
   ============================================================ */
.clock-weather-badge {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 6px;
    transition: transform 0.15s ease, background 0.15s ease;
    user-select: none;
}
.clock-weather-badge:hover {
    transform: scale(1.05);
    background: rgba(30, 41, 59, 0.9);
}

/* ============================================================
   SIMS 4 STYLE MOODLETS & EMOTIONAL BUFFS TRAY
   ============================================================ */
.hud-moodlets-tray {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    max-width: 250px;
    margin-left: 8px;
    padding: 2px 4px;
}

.moodlet-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.88);
    border: 1.5px solid var(--moodlet-color, #2ecc71);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    cursor: default;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
}

.moodlet-chip:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.moodlet-chip .moodlet-icon {
    font-size: 0.85rem;
}

.moodlet-chip .moodlet-name {
    letter-spacing: 0.2px;
}

.moodlet-chip .moodlet-timer {
    font-size: 0.62rem;
    opacity: 0.85;
    margin-left: 2px;
    font-variant-numeric: tabular-nums;
}

/* Placement HUD Rotate button */
#hudRotateBuildBtn, #hudRotateBtn {
    background: linear-gradient(135deg, #0984e3, #6c5ce7) !important;
    border-color: #74b9ff !important;
    color: #ffffff !important;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(9, 132, 227, 0.4);
}

#hudRotateBuildBtn:hover, #hudRotateBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(9, 132, 227, 0.6);
}

/* ============================================================
   SIM BACKPACK & INVENTORY SYSTEM STYLES
   ============================================================ */
.inv-modal-card {
    max-width: 780px;
    width: 94vw;
    max-height: 88vh;
    background: linear-gradient(155deg, rgba(17, 24, 39, 0.98), rgba(10, 15, 26, 0.99));
    border: 2px solid rgba(243, 156, 18, 0.45);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.95), 0 0 30px rgba(243, 156, 18, 0.2);
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.inv-tabs-header {
    display: flex;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(0, 0, 0, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    overflow-x: auto;
}

.inv-tab-btn {
    padding: 6px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.inv-tab-btn:hover {
    background: rgba(243, 156, 18, 0.2);
    border-color: #f39c12;
    color: #fff;
}

.inv-tab-btn.active {
    background: linear-gradient(135deg, #e67e22, #f39c12);
    border-color: #f1c40f;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.4);
}

.inv-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    min-height: 240px;
    max-height: 55vh;
}

.inv-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 14px;
}

.inv-item-card {
    background: rgba(30, 41, 59, 0.7);
    border: 1.5px solid var(--rarity-border, rgba(255, 255, 255, 0.15));
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.inv-item-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.55), 0 0 14px var(--rarity-border);
}

.inv-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.inv-item-icon {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.inv-item-qty {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffd166;
}

.inv-item-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
}

.inv-rarity-pill {
    align-self: flex-start;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 1px 6px;
    border-radius: 6px;
}

.inv-item-desc {
    font-size: 0.72rem;
    color: #94a3b8;
    line-height: 1.35;
    flex: 1;
    margin: 4px 0;
}

.inv-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 8px;
    margin-top: 4px;
}

.inv-item-val {
    font-size: 0.82rem;
    font-weight: 700;
    color: #2ecc71;
}

.inv-actions {
    display: flex;
    gap: 6px;
}

.inv-use-btn {
    padding: 4px 10px !important;
    font-size: 0.72rem !important;
    background: linear-gradient(135deg, #27ae60, #2ecc71) !important;
    border-color: #2ecc71 !important;
    color: #fff !important;
    font-weight: 700 !important;
}

.inv-sell-btn {
    padding: 4px 8px !important;
    font-size: 0.72rem !important;
    background: rgba(231, 76, 60, 0.2) !important;
    border-color: rgba(231, 76, 60, 0.5) !important;
    color: #ff7675 !important;
}

.inv-sell-btn:hover {
    background: #e74c3c !important;
    color: #fff !important;
}

.inv-summary-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
    color: #94a3b8;
}

.inv-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

/* -------------------------------------------------------------------------
   ASPIRATIONS, TRAITS, DYNAMIC WHIMS & REWARDS STORE STYLES
   ------------------------------------------------------------------------- */
.hud-whims-container {
    display: flex;
    flex-direction: row;
    gap: 8px;
    margin-bottom: 8px;
    z-index: 1000;
    pointer-events: auto;
}

.whim-bubble {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(20, 25, 35, 0.92);
    border: 2px solid rgba(245, 158, 11, 0.65);
    border-radius: 20px;
    padding: 5px 10px;
    color: #ffffff;
    font-size: 0.73rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 0 8px rgba(245, 158, 11, 0.2);
    backdrop-filter: blur(8px);
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    max-width: 210px;
    position: relative;
    user-select: none;
}

.whim-bubble:hover {
    transform: translateY(-2px) scale(1.02);
    border-color: #fbbf24;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 14px rgba(245, 158, 11, 0.35);
}

.whim-bubble.pinned {
    border-color: #38bdf8;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 0 10px rgba(56, 189, 248, 0.35);
}

.whim-icon-wrap {
    position: relative;
    font-size: 1.25rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whim-pin-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    font-size: 0.65rem;
}

.whim-body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    line-height: 1.2;
}

.whim-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #f1f5f9;
}

.whim-reward {
    font-size: 0.66rem;
    color: #f59e0b;
    font-weight: 700;
    margin-top: 1px;
}

.whim-actions {
    display: flex;
    gap: 2px;
    margin-left: auto;
    flex-shrink: 0;
}

.whim-pin-btn, .whim-dismiss-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 0.72rem;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.whim-pin-btn:hover {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.2);
}

.whim-dismiss-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.2);
}

.hud-satisfaction-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #ffd166;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 2px;
}

.hud-satisfaction-chip:hover {
    background: rgba(245, 158, 11, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

/* Modal Dialog */
.aspiration-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 14, 23, 0.75);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.aspiration-modal-card {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 1.5px solid rgba(245, 158, 11, 0.4);
    border-radius: 20px;
    width: 900px;
    max-width: 95vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(245, 158, 11, 0.15);
    overflow: hidden;
    color: #ffffff;
}

.aspiration-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.aspiration-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.asp-star-emblem {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.7));
}

.aspiration-header-title h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.aspiration-header-title p {
    margin: 2px 0 0 0;
    font-size: 0.75rem;
    color: #94a3b8;
}

.aspiration-points-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.5);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fbbf24;
}

.asp-close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.asp-close-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

.aspiration-tabs-nav {
    display: flex;
    background: rgba(15, 23, 42, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0 18px;
    gap: 8px;
}

.asp-tab-btn {
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 12px 18px;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
}

.asp-tab-btn:hover {
    color: #f1f5f9;
}

.asp-tab-btn.active {
    color: #fbbf24;
    border-bottom-color: #fbbf24;
}

.aspiration-tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

/* Current Aspiration Layout */
.asp-main-view {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
}

.asp-active-card {
    background: rgba(30, 41, 59, 0.65);
    border: 1.5px solid rgba(245, 158, 11, 0.35);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.asp-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.asp-card-badge {
    font-size: 2.2rem;
    background: rgba(245, 158, 11, 0.2);
    border: 1.5px solid rgba(245, 158, 11, 0.4);
    border-radius: 16px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.asp-card-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: #f8fafc;
}

.asp-card-header p {
    margin: 4px 0 0 0;
    font-size: 0.8rem;
    color: #94a3b8;
}

.asp-tier-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 16px;
    font-weight: 700;
    font-size: 0.85rem;
    color: #e2e8f0;
}

.asp-tier-reward {
    color: #fbbf24;
    font-size: 0.85rem;
}

.asp-objectives-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.asp-objective-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 10px 14px;
    transition: all 0.15s ease;
}

.asp-objective-row.completed {
    border-color: rgba(34, 197, 94, 0.4);
    background: rgba(34, 197, 94, 0.1);
}

.asp-obj-status {
    font-size: 1.1rem;
}

.asp-obj-info {
    flex: 1;
}

.asp-obj-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #f8fafc;
}

.asp-obj-progress {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 2px;
}

.asp-bonus-trait-box {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.05));
    border: 1.5px dashed rgba(245, 158, 11, 0.5);
    border-radius: 12px;
    padding: 12px 16px;
}

.asp-trait-badge {
    font-size: 0.8rem;
    font-weight: 800;
    color: #fbbf24;
    display: block;
    margin-bottom: 4px;
}

.asp-bonus-trait-box p {
    margin: 0;
    font-size: 0.78rem;
    color: #e2e8f0;
    line-height: 1.4;
}

/* Switcher Column */
.asp-switcher-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.asp-switcher-col h4 {
    margin: 0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
}

.asp-selector-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    max-height: 480px;
}

.asp-selector-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(30, 41, 59, 0.45);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
    text-align: left;
    color: #ffffff;
    transition: all 0.15s ease;
}

.asp-selector-card:hover {
    background: rgba(30, 41, 59, 0.75);
    border-color: rgba(245, 158, 11, 0.4);
}

.asp-selector-card.selected {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
}

.asp-sel-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.asp-sel-meta strong {
    display: block;
    font-size: 0.82rem;
    color: #f8fafc;
}

.asp-sel-meta small {
    font-size: 0.7rem;
    color: #94a3b8;
}

/* Traits Picker Grid */
.traits-main-container {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.traits-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.traits-header-row h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
}

.traits-header-row p {
    margin: 3px 0 0 0;
    font-size: 0.78rem;
    color: #94a3b8;
}

.traits-count-pill {
    background: rgba(56, 189, 248, 0.2);
    border: 1px solid rgba(56, 189, 248, 0.5);
    color: #38bdf8;
    padding: 4px 12px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.8rem;
}

.traits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 14px;
}

.trait-picker-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.18s ease;
}

.trait-picker-card.active-trait {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.12);
}

.trait-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.trait-card-icon {
    font-size: 1.6rem;
}

.trait-card-top strong {
    display: block;
    font-size: 0.88rem;
    color: #f8fafc;
}

.trait-cat-tag {
    font-size: 0.65rem;
    color: #94a3b8;
    text-transform: uppercase;
}

.trait-card-desc {
    margin: 0;
    font-size: 0.75rem;
    color: #cbd5e1;
    line-height: 1.35;
    flex: 1;
}

.trait-toggle-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.trait-toggle-btn.btn-active {
    background: #22c55e;
    border-color: #22c55e;
    color: #ffffff;
}

/* Rewards Store Grid */
.rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.reward-store-card {
    background: rgba(30, 41, 59, 0.55);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.18s ease;
}

.reward-store-card:hover {
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(30, 41, 59, 0.8);
}

.reward-store-card.owned {
    border-color: rgba(34, 197, 94, 0.5);
    background: rgba(34, 197, 94, 0.08);
}

.reward-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reward-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.reward-meta strong {
    display: block;
    font-size: 0.88rem;
    color: #f8fafc;
}

.reward-cat-tag {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
}

.reward-cat-tag.consumable {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
}

.reward-cat-tag.perk {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
}

.reward-desc {
    margin: 0;
    font-size: 0.76rem;
    color: #cbd5e1;
    line-height: 1.35;
    flex: 1;
}

.reward-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
}

.reward-cost {
    font-weight: 800;
    color: #fbbf24;
    font-size: 0.82rem;
}

.reward-buy-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: none;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.reward-buy-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    transform: translateY(-1px);
}

.reward-buy-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.reward-buy-btn.btn-owned {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: #22c55e;
}

/* ==========================================================================
   GARDENING, PLANT CULTIVATION & VALLEY FARMER'S MARKET MODALS
   ========================================================================== */
.seed-modal-card {
    max-width: 680px;
    width: 90%;
    background: linear-gradient(145deg, #1b3320 0%, #0d1e13 100%);
    border: 2px solid #2ecc71;
    border-radius: 20px;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(46, 204, 113, 0.25);
}

.seeds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    max-height: 520px;
    overflow-y: auto;
    padding: 16px;
}

.seed-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(46, 204, 113, 0.3);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.seed-card:hover {
    background: rgba(46, 204, 113, 0.12);
    border-color: #2ecc71;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.seed-icon {
    font-size: 2.2rem;
    line-height: 1;
}

.seed-info h4 {
    margin: 0 0 4px 0;
    font-size: 1.05rem;
    color: #ffffff;
}

.seed-cat {
    font-size: 0.72rem;
    color: #2ecc71;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.seed-info p {
    margin: 6px 0;
    font-size: 0.8rem;
    color: #cbd5e1;
    line-height: 1.3;
}

.seed-stock {
    font-size: 0.82rem;
    color: #ffd166;
    margin-top: 4px;
}

.empty-seeds-notice {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px 20px;
    color: #cbd5e1;
}

.empty-seeds-notice p {
    margin: 8px 0;
    font-size: 0.95rem;
}

/* --- FARMER'S MARKET MODAL --- */
.market-modal-card {
    max-width: 820px;
    width: 92%;
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border: 2px solid #10b981;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(16, 185, 129, 0.25);
    overflow: hidden;
}

.market-funds {
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid #f59e0b;
    color: #fbbf24;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.9rem;
}

.market-tabs {
    display: flex;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.market-tab-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94a3b8;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.market-tab-btn.active, .market-tab-btn:hover {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #34d399;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.market-body {
    padding: 16px;
    max-height: 540px;
    overflow-y: auto;
}

.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 12px;
}

.market-seed-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.market-seed-card:hover {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.06);
}

.market-item-icon {
    font-size: 1.8rem;
}

.market-item-details h4 {
    margin: 0 0 2px 0;
    font-size: 0.95rem;
    color: #ffffff;
}

.market-badge {
    font-size: 0.7rem;
    color: #38bdf8;
    text-transform: uppercase;
    font-weight: 700;
}

.market-price {
    font-size: 1.05rem;
    font-weight: 800;
    color: #34d399;
    margin-top: 4px;
}

.market-sell-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.market-sell-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.sell-icon {
    font-size: 2rem;
}

.sell-details {
    flex: 1;
}

.sell-details strong {
    font-size: 1rem;
    color: #ffffff;
}

.sell-premium {
    font-size: 0.78rem;
    color: #34d399;
    font-weight: 700;
    margin-top: 2px;
}

.market-empty-box {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
}

/* --- BOTANICAL ALMANAC --- */
.almanac-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.almanac-header-stats {
    display: flex;
    gap: 16px;
}

.almanac-stat-box {
    flex: 1;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.almanac-stat-box span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
}

.almanac-stat-box strong {
    font-size: 1.15rem;
    color: #34d399;
}

.almanac-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 12px;
}

.almanac-crop-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s ease;
}

.almanac-crop-card.locked {
    opacity: 0.45;
    filter: grayscale(0.8);
    border-style: dashed;
}

.almanac-crop-card.unlocked {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.05);
}

.almanac-crop-icon {
    font-size: 2rem;
}

.almanac-crop-info h4 {
    margin: 0 0 2px 0;
    font-size: 0.95rem;
    color: #ffffff;
}

.almanac-badge {
    font-size: 0.68rem;
    color: #94a3b8;
    font-weight: 700;
}

.almanac-badge.unlocked-badge {
    color: #34d399;
}

.almanac-crop-info p {
    margin: 6px 0;
    font-size: 0.75rem;
    color: #cbd5e1;
    line-height: 1.3;
}

.almanac-stats {
    font-size: 0.72rem;
    color: #ffd166;
    margin-top: 4px;
}

/* ==========================================================================
   FULLSCREEN LANDSCAPE & ORIENTATION CONTROLS
   ========================================================================== */
.landscape-btn {
    background: linear-gradient(135deg, #0284c7, #0369a1) !important;
    border-color: #38bdf8 !important;
    color: #ffffff !important;
    transition: all 0.2s ease !important;
}

.landscape-btn:hover {
    background: linear-gradient(135deg, #0369a1, #075985) !important;
    border-color: #7dd3fc !important;
}

.landscape-btn.active {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border-color: #34d399 !important;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.5) !important;
}

/* Floating Landscape Toast */
.landscape-toast {
    position: fixed;
    top: calc(18px + env(safe-area-inset-top, 0px));
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 24, 40, 0.92);
    border: 1.5px solid rgba(56, 189, 248, 0.6);
    border-radius: 20px;
    padding: 8px 20px;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 12px rgba(56, 189, 248, 0.4);
    z-index: 9999;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Forced Landscape CSS Fallback (for iOS Safari and orientation-locked mobile devices) */
body.forced-landscape {
    width: 100vh !important;
    height: 100vw !important;
    transform: rotate(90deg) !important;
    transform-origin: top left !important;
    position: fixed !important;
    top: 0 !important;
    left: 100vw !important;
    overflow: hidden !important;
}

/* Mobile Modes Drawer Header */
.mobile-modes-drawer-header {
    display: none;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(80, 160, 220, 0.3);
    color: #ffffff;
    font-size: 0.88rem;
}

.mobile-modes-close-btn {
    background: rgba(231, 76, 60, 0.3);
    border: 1px solid #e74c3c;
    border-radius: 12px;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    cursor: pointer;
}

/* ==========================================================================
   MOBILE DEVICE COMPATIBILITY & RESPONSIVE SUBSYSTEM
   Strictly scoped to mobile devices (max-width: 768px) and touch viewports.
   Normal PC desktop browsers (> 768px with mouse) remain 100% UNTOUCHED.
   ========================================================================== */

/* 1. Desktop Exclusion: ensure mobile elements never appear on PC */
@media (min-width: 769px) and (min-height: 501px) {
    .mobile-only {
        display: none !important;
    }
}

/* 2. Mobile Responsive Layout & Touch Ergonomics */
@media (max-width: 768px), (max-height: 500px) and (orientation: landscape) {
    /* Safe Area insets for modern mobile displays with notches */
    :root {
        --safe-top: env(safe-area-inset-top, 0px);
        --safe-bottom: env(safe-area-inset-bottom, 0px);
        --safe-left: env(safe-area-inset-left, 0px);
        --safe-right: env(safe-area-inset-right, 0px);
    }

    body {
        touch-action: none;
        -webkit-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }

    /* TOP HEADER & NAVIGATION ON MOBILE */
    .game-header {
        top: calc(8px + var(--safe-top)) !important;
        left: calc(8px + var(--safe-left)) !important;
        right: calc(8px + var(--safe-right)) !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        gap: 6px !important;
    }

    .current-lot-hud {
        padding: 4px 7px !important;
        gap: 5px !important;
        border-radius: 14px !important;
        max-width: 120px !important;
        flex-shrink: 1 !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4) !important;
    }

    .lot-pin-icon {
        font-size: 1rem !important;
    }

    .lot-hud-name {
        font-size: 0.78rem !important;
        max-width: 110px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .district-pill {
        font-size: 0.58rem !important;
        padding: 1px 5px !important;
    }

    .lot-hud-details-row {
        display: none !important; /* Conceal secondary lot meta on mobile header to preserve viewport */
    }

    /* TOP TOOLBAR ON MOBILE */
    .top-toolbar {
        max-width: fit-content !important;
        align-items: flex-end !important;
        gap: 4px !important;
    }

    .top-toolbar-row.utility-row {
        flex-wrap: wrap !important;
        justify-content: flex-end !important;
        gap: 4px !important;
    }

    .top-toolbar-row.utility-row .camera-group {
        display: none !important; /* Concealed in top toolbar on mobile: Quick-Cam thumb cluster & multi-touch gestures handle camera */
    }

    .landscape-group {
        gap: 4px !important;
    }

    .landscape-group .landscape-btn {
        padding: 4px 8px !important;
        font-size: 0.72rem !important;
        border-radius: 12px !important;
    }

    .travel-group {
        gap: 4px !important;
    }

    .travel-group .sims-btn {
        padding: 4px 7px !important;
        font-size: 0.72rem !important;
        border-radius: 12px !important;
    }

    .camera-group {
        padding: 2px 3px !important;
        border-radius: 14px !important;
        gap: 2px !important;
    }

    .camera-group .cam-ctrl-btn {
        width: 24px !important;
        height: 24px !important;
        font-size: 0.75rem !important;
    }

    .system-group {
        gap: 4px !important;
    }

    #freeWillToggleBtn {
        display: none !important; /* Concealed in mobile top bar */
    }

    #audioToggleBtn {
        padding: 4px 7px !important;
        font-size: 0.72rem !important;
    }

    /* Mobile Modes Toggle Pill */
    .mobile-modes-btn {
        display: inline-flex !important;
        align-items: center;
        gap: 4px;
        padding: 4px 9px !important;
        font-size: 0.75rem !important;
        font-weight: 700 !important;
        background: linear-gradient(135deg, #0984e3, #6c5ce7) !important;
        border: 1.5px solid #74b9ff !important;
        border-radius: 14px !important;
        box-shadow: 0 2px 8px rgba(9, 132, 227, 0.45);
        color: #ffffff !important;
        cursor: pointer;
    }

    /* MODES ROW -> SLIDE-OUT MOBILE ACTION DRAWER */
    .top-toolbar-row.modes-row {
        display: none;
        position: fixed !important;
        top: calc(56px + var(--safe-top)) !important;
        left: calc(10px + var(--safe-left)) !important;
        right: calc(10px + var(--safe-right)) !important;
        width: auto !important;
        max-width: none !important;
        max-height: calc(82vh - 60px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        background: rgba(12, 28, 46, 0.97) !important;
        border: 2px solid var(--sims-border) !important;
        border-radius: 20px !important;
        padding: 14px 12px !important;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85) !important;
        backdrop-filter: blur(18px) !important;
        -webkit-backdrop-filter: blur(18px) !important;
        z-index: 400 !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        gap: 8px !important;
    }

    .top-toolbar-row.modes-row.mobile-expanded {
        display: flex !important;
        animation: mobileDrawerSlide 0.22s cubic-bezier(0.18, 0.89, 0.32, 1.28) !important;
    }

    @keyframes mobileDrawerSlide {
        from { opacity: 0; transform: translateY(-12px) scale(0.96); }
        to { opacity: 1; transform: translateY(0) scale(1); }
    }

    .top-toolbar-row.modes-row .sims-btn {
        flex: 1 1 calc(50% - 6px) !important;
        min-width: 130px !important;
        min-height: 42px !important;
        font-size: 0.82rem !important;
        padding: 9px 8px !important;
        border-radius: 12px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        white-space: nowrap !important;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4) !important;
    }

    /* BOTTOM MASTER HUD ON MOBILE */
    #bottomHUD {
        bottom: calc(8px + var(--safe-bottom)) !important;
        left: calc(8px + var(--safe-left)) !important;
        right: calc(8px + var(--safe-right)) !important;
        align-items: flex-end !important;
        gap: 6px !important;
    }

    .sim-hud-left-cluster {
        gap: 6px !important;
    }

    .sim-profile-card {
        padding: 6px 10px !important;
        border-radius: 18px !important;
        gap: 8px !important;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5) !important;
    }

    .sim-portrait-wrap {
        width: 44px !important;
        height: 44px !important;
        font-size: 1.5rem !important;
        border-width: 2px !important;
    }

    .plumbob-icon-badge {
        font-size: 0.85rem !important;
        top: -6px !important;
        right: -3px !important;
    }

    .sim-info-col {
        min-width: auto !important;
        gap: 2px !important;
    }

    .sim-name {
        font-size: 0.88rem !important;
        line-height: 1.1;
    }

    .sim-emotion-badge {
        font-size: 0.65rem !important;
    }

    .sim-wallet {
        font-size: 0.82rem !important;
    }

    .hud-career-chip,
    .hud-satisfaction-chip {
        display: none !important; /* Conceal secondary chips on small mobile card */
    }

    .mobile-needs-btn {
        display: inline-flex !important;
        padding: 3px 8px !important;
        font-size: 0.68rem !important;
        font-weight: 700 !important;
        background: linear-gradient(135deg, #27ae60, #2ecc71) !important;
        border: 1px solid #2ecc71 !important;
        border-radius: 10px !important;
        color: #ffffff !important;
        margin-top: 2px !important;
        cursor: pointer;
    }

    /* ACTION QUEUE BAR ON MOBILE */
    .action-queue-bar {
        min-height: 38px !important;
        margin-bottom: 4px !important;
        gap: 4px !important;
    }

    .active-activity-card {
        padding: 3px 8px 3px 4px !important;
        border-radius: 16px !important;
        gap: 6px !important;
    }

    .active-activity-icon-slot {
        width: 26px !important;
        height: 26px !important;
        font-size: 0.95rem !important;
    }

    .activity-title {
        font-size: 0.72rem !important;
    }

    .activity-cancel-x {
        width: 16px !important;
        height: 16px !important;
        font-size: 0.65rem !important;
    }

    /* NEEDS PANEL -> MOBILE POPUP DRAWER */
    .needs-panel {
        display: none;
        position: fixed !important;
        bottom: calc(76px + var(--safe-bottom)) !important;
        left: calc(10px + var(--safe-left)) !important;
        right: calc(10px + var(--safe-right)) !important;
        width: auto !important;
        max-width: 360px !important;
        margin: 0 auto !important;
        z-index: 250 !important;
        background: rgba(14, 34, 54, 0.97) !important;
        border: 2px solid var(--sims-border) !important;
        border-radius: 20px !important;
        padding: 12px 16px !important;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8) !important;
        backdrop-filter: blur(16px) !important;
        -webkit-backdrop-filter: blur(16px) !important;
    }

    .needs-panel.mobile-active {
        display: flex !important;
        animation: mobileNeedsSlide 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28) !important;
    }

    @keyframes mobileNeedsSlide {
        from { opacity: 0; transform: translateY(16px) scale(0.96); }
        to { opacity: 1; transform: translateY(0) scale(1); }
    }

    /* MULTIPLAYER CHAT WINDOW ON MOBILE */
    #chatContainer {
        position: fixed !important;
        left: calc(8px + var(--safe-left)) !important;
        right: calc(8px + var(--safe-right)) !important;
        width: auto !important;
        min-width: auto !important;
        max-width: none !important;
        z-index: 60 !important;
    }

    #chatContainer.collapsed {
        bottom: calc(74px + var(--safe-bottom)) !important;
        left: calc(8px + var(--safe-left)) !important;
        width: fit-content !important;
        max-width: 210px !important;
        height: 32px !important;
        min-height: 32px !important;
        border-radius: 16px !important;
        padding: 5px 8px !important;
    }

    #chatContainer:not(.collapsed) {
        bottom: calc(74px + var(--safe-bottom)) !important;
        height: 200px !important;
        max-height: 38vh !important;
        border-radius: 16px !important;
    }

    #chatContainer .chat-resize-handle {
        display: none !important;
    }

    .chat-header {
        cursor: default !important;
        touch-action: auto !important;
    }

    .chat-tab-btn {
        padding: 2px 7px !important;
        font-size: 0.7rem !important;
    }

    #chatInput {
        font-size: 16px !important; /* Critical to avoid iOS auto-zoom */
    }

    /* PIE MENU ON MOBILE */
    #pieMenuContainer {
        width: 190px !important;
        height: 190px !important;
    }

    .pie-center-disc {
        width: 74px !important;
        height: 74px !important;
        font-size: 0.65rem !important;
        padding: 4px !important;
    }

    .pie-slice-btn {
        width: 78px !important;
        height: 38px !important;
        font-size: 0.72rem !important;
        touch-action: manipulation;
    }

    .pie-slice-btn span {
        font-size: 0.85rem !important;
    }

    /* ALL MODALS ON MOBILE */
    .sims-modal {
        padding: 8px !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .modal-card,
    .auth-modal-card,
    .career-modal-card,
    .skills-modal-card,
    .market-modal-card,
    .battler-modal-card,
    .inventory-modal-card,
    .almanac-modal-card,
    .raid-modal-card,
    .vip-modal-card,
    .buy-modal-card {
        max-width: 100% !important;
        width: 100% !important;
        max-height: 92vh !important;
        padding: 12px 14px !important;
        border-radius: 16px !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        box-sizing: border-box !important;
    }

    .buy-catalog-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
        grid-auto-rows: minmax(260px, auto) !important;
        gap: 10px !important;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px !important; /* iOS Safari auto-zoom prevention */
        min-height: 38px;
    }

    /* WORLD MAP ON MOBILE */
    .neighborhood-screen {
        padding: calc(10px + var(--safe-top)) 10px calc(10px + var(--safe-bottom)) 10px !important;
    }

    .neighborhood-header {
        padding-bottom: 8px !important;
        margin-bottom: 8px !important;
        gap: 8px !important;
    }

    .neighborhood-title-group h2 {
        font-size: 1.15rem !important;
    }

    .lots-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    /* MOBILE FLOATING QUICK CAMERA THUMB BAR */
    .mobile-quick-cam {
        position: fixed;
        right: calc(8px + var(--safe-right));
        top: 50%;
        transform: translateY(-50%);
        display: flex;
        flex-direction: column;
        gap: 6px;
        z-index: 45;
        pointer-events: auto;
    }

    .quick-cam-btn {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: rgba(14, 34, 54, 0.88);
        border: 1.5px solid var(--sims-border);
        color: #ffffff;
        font-size: 1rem;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        cursor: pointer;
        user-select: none;
        touch-action: manipulation;
        transition: transform 0.1s, background 0.1s;
    }

    .quick-cam-btn:active {
        transform: scale(0.92);
        background: rgba(46, 204, 113, 0.35);
        border-color: #2ecc71;
    }

    .mobile-modes-drawer-header {
        display: flex !important;
    }

    /* LANDSCAPE TOAST ON MOBILE */
    .landscape-toast {
        top: calc(10px + var(--safe-top)) !important;
        font-size: 0.76rem !important;
        padding: 6px 14px !important;
        max-width: 90% !important;
        text-align: center !important;
    }
}

/* =========================================================================
   MELSSCAPE (OSRS MMO VR HOLODECK) RETRO CLIENT STYLES
   ========================================================================= */
.melsscape-container {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 250000 !important;
    background: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    user-select: none;
    overflow: hidden;
}

.osrs-client-frame {
    position: relative;
    width: 100%;
    height: 100%;
    background: #050608;
    overflow: hidden;
}

.osrs-viewport {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: default;
}

#osrsCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

.osrs-click-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
}

/* --- MINIMAP RADAR PANEL (Top Right) --- */
.osrs-minimap-panel {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    z-index: 20;
    pointer-events: none;
}

.osrs-radar-wrap {
    position: relative;
    width: 152px;
    height: 152px;
    background: #14120e;
    border: 3px solid #4a3c28;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7), inset 0 0 10px rgba(0, 0, 0, 0.8);
    pointer-events: auto;
}

#osrsRadarCanvas {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
}

.osrs-compass-btn {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 28px;
    height: 28px;
    background: radial-gradient(circle, #383023 0%, #1e1912 100%);
    border: 1.5px solid #8e7345;
    border-radius: 50%;
    color: #ff3333;
    font-size: 0.75rem;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.6);
    transition: transform 0.1s;
}
.osrs-compass-btn:hover {
    transform: scale(1.1);
}

.osrs-orbs-column {
    display: flex;
    flex-direction: column;
    gap: 6px;
    pointer-events: auto;
}

.osrs-orb {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(30, 25, 18, 0.92);
    border: 1.5px solid #6b5535;
    border-radius: 14px;
    padding: 3px 8px;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
}

.osrs-orb .orb-icon {
    font-size: 0.85rem;
}

.orb-hp .orb-val { color: #55ff55; }
.orb-prayer .orb-val { color: #55ffff; }
.orb-run .orb-val { color: #ffff55; }

.orb-logout {
    background: rgba(180, 40, 40, 0.85);
    border-color: #ff6666;
    cursor: pointer;
    justify-content: center;
    transition: background 0.15s, transform 0.1s;
}
.orb-logout:hover {
    background: rgba(220, 50, 50, 1);
    transform: scale(1.05);
}

/* --- CHATBOX PANEL (Bottom Left) --- */
.osrs-chatbox-panel {
    position: absolute;
    bottom: 8px;
    left: 8px;
    width: min(500px, calc(100vw - 250px));
    height: 140px;
    background: rgba(20, 18, 14, 0.92);
    border: 2px solid #5a4931;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    z-index: 20;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
    overflow: hidden;
}

.osrs-chat-messages {
    flex: 1;
    padding: 6px 8px;
    overflow-y: auto;
    font-size: 0.76rem;
    line-height: 1.35;
    color: #ffff00;
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-shadow: 1px 1px 1px #000;
}

.osrs-chat-line {
    word-break: break-word;
}
.osrs-chat-line.game-msg { color: #ffffff; }
.osrs-chat-line.chat-public { color: #ffff00; }
.osrs-chat-line.chat-clan { color: #88ff88; }
.osrs-chat-line.chat-system { color: #ff5555; }

.osrs-chat-input-row {
    display: flex;
    align-items: center;
    background: #14120e;
    border-top: 1px solid #3d3120;
    padding: 2px 6px;
    gap: 6px;
}

.osrs-chat-prompt {
    font-size: 0.72rem;
    color: #ffcc00;
    font-weight: 700;
}

#osrsChatInput {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #55ffff;
    font-size: 0.75rem;
    font-family: inherit;
}

.osrs-chat-tabs {
    display: flex;
    background: #1e1912;
    border-top: 1px solid #4a3c28;
}

.osrs-chat-tab {
    flex: 1;
    background: transparent;
    border: none;
    border-right: 1px solid #33291b;
    padding: 3px 0;
    color: #aaa;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
}
.osrs-chat-tab.active, .osrs-chat-tab:hover {
    color: #ffcc00;
    background: #2a2218;
}

/* --- CONTROL PANEL / STONE INTERFACE (Bottom Right) --- */
.osrs-control-panel {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 228px;
    height: 310px;
    background: #2d251a;
    border: 3px solid #6b5535;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    z-index: 20;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.8), inset 0 0 12px rgba(0,0,0,0.5);
    overflow: hidden;
}

.osrs-tab-window {
    flex: 1;
    padding: 6px;
    overflow-y: auto;
    background: #1f1911;
}

.osrs-header-strip {
    background: #3d3121;
    border: 1px solid #55442e;
    color: #ffcc00;
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
    padding: 3px 0;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 3px;
}

/* 28-Slot Inventory Grid */
.osrs-inventory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(7, 32px);
    gap: 4px;
}

.osrs-inv-slot {
    background: #2a2217;
    border: 1.5px solid #483925;
    border-radius: 3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    font-size: 1.1rem;
    transition: background 0.1s, border-color 0.1s;
}
.osrs-inv-slot:hover {
    background: #3d3121;
    border-color: #8e7345;
}
.osrs-inv-slot.empty {
    cursor: default;
    background: #1b160f;
    border-color: #332819;
}
.osrs-inv-qty {
    position: absolute;
    top: 1px;
    left: 2px;
    font-size: 0.6rem;
    font-weight: 700;
    color: #ffff00;
    text-shadow: 1px 1px 0 #000;
}

/* Skills Grid (Supports both skill-box and skill-card) */
.osrs-skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
}

.osrs-skill-card, .osrs-skill-box {
    background: #2a2217;
    border: 1px solid #483925;
    border-radius: 3px;
    display: flex;
    align-items: center;
    padding: 3px 5px;
    gap: 6px;
    cursor: help;
}
.osrs-skill-card .skill-icon, .osrs-skill-icon {
    font-size: 1rem;
}
.osrs-skill-card .skill-info, .osrs-skill-nums {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.osrs-skill-card .skill-level, .osrs-skill-lvl {
    font-size: 0.76rem;
    font-weight: 800;
    color: #ffff00;
}
.osrs-skill-card .skill-name, .osrs-skill-name {
    font-size: 0.6rem;
    color: #b0a08a;
    text-transform: capitalize;
}

/* Quests List */
.osrs-quest-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.quest-item {
    font-size: 0.68rem;
    padding: 4px 6px;
    background: #2a2217;
    border-radius: 3px;
    color: #ff5555;
}
.quest-item.completed {
    color: #55ff55;
}

/* Combat Tab */
.osrs-combat-styles {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}
.osrs-style-btn {
    background: #2a2217;
    border: 1.5px solid #483925;
    border-radius: 4px;
    padding: 4px;
    color: #ddd;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    text-align: left;
}
.osrs-style-btn.active {
    border-color: #ff3333;
    background: #441c1c;
    color: #fff;
}
.osrs-retaliate-box {
    font-size: 0.72rem;
    color: #ffcc00;
    padding: 4px;
}

/* Paperdoll Equipment */
.osrs-paperdoll-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    justify-items: center;
    margin-bottom: 8px;
}
.doll-slot {
    width: 32px;
    height: 32px;
    background: #2a2217;
    border: 1.5px solid #483925;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
}
.osrs-equipment-stats {
    font-size: 0.68rem;
    color: #ffcc00;
    background: #241d14;
    padding: 4px 8px;
    border-radius: 4px;
    display: flex;
    justify-content: space-around;
}

/* Prayers & Spells */
.osrs-prayer-grid, .osrs-spell-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
}
.osrs-prayer-btn, .osrs-spell-btn {
    background: #2a2217;
    border: 1.5px solid #483925;
    border-radius: 4px;
    color: #eee;
    padding: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
}
.osrs-prayer-btn.active {
    border-color: #55ffff;
    background: #1c3844;
}

/* Settings Tab */
.osrs-settings-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 6px;
    font-size: 0.72rem;
    color: #ddd;
}
.osrs-exit-vr-btn {
    background: linear-gradient(180deg, #c0392b 0%, #962d22 100%);
    border: 2px solid #e74c3c;
    border-radius: 4px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 8px;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(0,0,0,0.5);
    transition: transform 0.1s;
}
.osrs-exit-vr-btn:hover {
    transform: scale(1.02);
}

/* Stone Navigation Bar (Bottom of Panel) */
.osrs-nav-tabs {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    background: #1c160f;
    border-top: 2px solid #55442e;
}

.osrs-nav-btn {
    background: transparent;
    border: none;
    border-right: 1px solid #33291b;
    padding: 5px 0;
    font-size: 0.85rem;
    cursor: pointer;
    opacity: 0.65;
    transition: opacity 0.1s, background 0.1s;
}
.osrs-nav-btn:hover {
    opacity: 1;
    background: #2e2417;
}
.osrs-nav-btn.active {
    opacity: 1;
    background: #483925;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

/* --- DIALOGUE & POPUP OVERLAYS --- */
.osrs-dialogue-modal {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: min(520px, 92vw);
    background: #2e261a;
    border: 3px solid #6b5535;
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.85);
    z-index: 50;
    padding: 10px;
}

.osrs-dialogue-box {
    display: flex;
    gap: 12px;
    align-items: center;
}

.osrs-dialogue-npc-head {
    font-size: 2.2rem;
    background: #1e1912;
    border: 2px solid #4a3c28;
    border-radius: 50%;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.osrs-dialogue-content {
    flex: 1;
}

.osrs-dialogue-content h4 {
    margin: 0 0 4px 0;
    color: #ff3333;
    font-size: 0.88rem;
}

.osrs-dialogue-content p {
    margin: 0 0 6px 0;
    color: #0000bb;
    font-size: 0.78rem;
    line-height: 1.35;
    background: #f4e8c1;
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid #d4c8a1;
}

.osrs-dialogue-btn {
    background: #3d3121;
    border: 1px solid #6b5535;
    color: #ffff00;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    cursor: pointer;
    border-radius: 3px;
}

/* Level Up Fanfare Overlay */
.osrs-levelup-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(420px, 90vw);
    background: #2e261a;
    border: 3px solid #ffd700;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.9);
    z-index: 60;
    padding: 16px;
    text-align: center;
    animation: bounceIn 0.3s ease;
}

.osrs-levelup-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.osrs-levelup-icon {
    font-size: 2.5rem;
}

.osrs-levelup-banner h3 {
    margin: 0;
    color: #ff3333;
    font-size: 1.15rem;
}

.osrs-levelup-banner p {
    margin: 0;
    color: #000088;
    background: #f4e8c1;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.82rem;
    font-weight: 600;
}

/* 100-Slot Bank Interface Modal */
.osrs-bank-modal {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 70;
}

.osrs-bank-window {
    width: min(560px, 94vw);
    max-height: 85vh;
    background: #2a2217;
    border: 3px solid #6b5535;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.9);
    overflow: hidden;
}

.osrs-bank-header {
    background: #382d1f;
    border-bottom: 2px solid #55442e;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffcc00;
    font-size: 0.85rem;
    font-weight: 700;
}

.osrs-bank-actions {
    display: flex;
    gap: 6px;
}

.osrs-stone-btn {
    background: #221a11;
    border: 1px solid #55442e;
    color: #eee;
    font-size: 0.68rem;
    padding: 3px 8px;
    border-radius: 3px;
    cursor: pointer;
}
.osrs-stone-btn:hover {
    background: #3d3121;
    color: #fff;
}

.osrs-close-btn {
    background: #802020;
    border: 1px solid #aa3333;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 3px;
    cursor: pointer;
}

.osrs-bank-grid {
    flex: 1;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    max-height: 340px;
    overflow-y: auto;
    background: #1a150e;
}

.osrs-bank-slot {
    width: 36px;
    height: 36px;
    background: #261f15;
    border: 1px solid #3d3120;
    border-radius: 3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    position: relative;
}
.osrs-bank-slot:hover {
    background: #3d3121;
    border-color: #8e7345;
}

.osrs-bank-footer {
    background: #221a11;
    border-top: 1px solid #3d3120;
    padding: 6px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.68rem;
    color: #aaa;
}

/* Mobile Responsiveness for MelsScape */
@media (max-width: 768px) {
    .osrs-chatbox-panel {
        width: calc(100vw - 16px);
        height: 100px;
        bottom: 8px;
        left: 8px;
        z-index: 15;
    }

    .osrs-control-panel {
        bottom: 114px;
        right: 8px;
        width: 190px;
        height: 250px;
    }

    .osrs-radar-wrap {
        width: 110px;
        height: 110px;
    }
}

/* --- OVERHEAD DRAGON BOSS HEALTH BAR --- */
.osrs-boss-bar {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: min(420px, 88vw);
    background: rgba(20, 15, 12, 0.94);
    border: 2px solid #8e2020;
    border-radius: 6px;
    padding: 6px 12px;
    z-index: 45;
    box-shadow: 0 4px 20px rgba(255, 0, 0, 0.4), inset 0 0 10px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.boss-bar-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ff4d4d;
    font-size: 0.82rem;
    font-weight: 800;
    text-shadow: 1px 1px 2px #000;
}

.boss-bar-track {
    width: 100%;
    height: 14px;
    background: #111111;
    border: 1px solid #441111;
    border-radius: 3px;
    overflow: hidden;
}

.boss-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #b91c1c 0%, #ef4444 50%, #22c55e 100%);
    transition: width 0.2s ease;
}

/* --- GENERIC OSRS MODALS (Smithing, Smelting, Shops) --- */
.osrs-modal {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 70;
}

.osrs-modal-window {
    width: min(500px, 94vw);
    max-height: 85vh;
    background: #2a2217;
    border: 3px solid #6b5535;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.9);
    overflow: hidden;
}

.osrs-modal-window.wide {
    width: min(620px, 96vw);
}

.osrs-modal-header {
    background: #382d1f;
    border-bottom: 2px solid #55442e;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffcc00;
    font-size: 0.85rem;
    font-weight: 700;
}

/* Smelting Grid */
.osrs-smelting-body {
    padding: 12px;
    color: #ddd;
    font-size: 0.78rem;
}
.osrs-smelt-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 10px;
}
.smelt-card {
    background: #1f1911;
    border: 1.5px solid #4a3c28;
    border-radius: 4px;
    padding: 10px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
}
.smelt-icon {
    font-size: 1.8rem;
}
.smelt-card strong {
    color: #ffcc00;
    font-size: 0.8rem;
}
.smelt-card small {
    color: #aaa;
    font-size: 0.65rem;
    line-height: 1.2;
    margin-bottom: 6px;
}

/* Anvil Forging */
.osrs-anvil-tabs {
    display: flex;
    background: #1c160f;
    border-bottom: 1.5px solid #4a3c28;
}
.osrs-anvil-tab {
    flex: 1;
    background: transparent;
    border: none;
    border-right: 1px solid #33291b;
    padding: 6px 0;
    color: #aaa;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
}
.osrs-anvil-tab.active, .osrs-anvil-tab:hover {
    color: #ffcc00;
    background: #2f2518;
}
.osrs-anvil-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 12px;
    max-height: 360px;
    overflow-y: auto;
    background: #19140e;
}
.osrs-anvil-card {
    background: #241d14;
    border: 1px solid #4a3c28;
    border-radius: 4px;
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
}
.anvil-icon {
    font-size: 1.6rem;
}
.osrs-anvil-card strong {
    color: #eee;
    font-size: 0.76rem;
}
.osrs-anvil-card small {
    color: #ffcc00;
    font-size: 0.64rem;
    margin-bottom: 4px;
}

/* NPC Shops */
.osrs-shop-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 12px;
    max-height: 380px;
    overflow-y: auto;
    background: #1a150e;
}
.osrs-shop-section h4 {
    margin: 0 0 8px 0;
    color: #ffcc00;
    font-size: 0.75rem;
    border-bottom: 1px solid #4a3c28;
    padding-bottom: 4px;
}
.osrs-shop-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}
.osrs-shop-slot {
    background: #261f15;
    border: 1px solid #483925;
    border-radius: 4px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: background 0.1s, border-color 0.1s;
}
.osrs-shop-slot:hover {
    background: #3d3121;
    border-color: #8e7345;
}
.osrs-shop-slot .slot-icon {
    font-size: 1.4rem;
}
.osrs-shop-slot .slot-name {
    font-size: 0.68rem;
    color: #eee;
    font-weight: 600;
    margin: 2px 0;
}
.osrs-shop-slot .slot-price {
    font-size: 0.64rem;
    color: #55ffff;
    font-weight: 700;
}

/* Quest Completion Parchment Scroll Modal */
.osrs-quest-scroll-modal {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 75;
}
.osrs-quest-scroll {
    width: min(440px, 92vw);
    background: #f4e8c1;
    border: 6px double #6b5535;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    color: #2b1f13;
    box-shadow: 0 16px 48px rgba(0,0,0,0.9), inset 0 0 30px rgba(139, 90, 43, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: bounceIn 0.35s ease;
}
.scroll-ribbon {
    background: #8b1e1e;
    color: #ffd700;
    font-weight: 900;
    font-size: 0.95rem;
    padding: 4px 16px;
    border-radius: 4px;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.osrs-quest-scroll h2 {
    margin: 4px 0;
    color: #8b1e1e;
    font-size: 1.35rem;
}
.scroll-body {
    width: 100%;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid #d4c8a1;
    border-radius: 6px;
    padding: 10px;
}
.scroll-body p {
    margin: 0 0 6px 0;
    font-weight: 700;
    font-size: 0.82rem;
}
.scroll-body ul {
    list-style: none;
    padding: 0;
    margin: 0 0 8px 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: #1a4a1a;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.scroll-qp-badge {
    font-weight: 800;
    font-size: 0.85rem;
    color: #8b1e1e;
}

/* Retro Jukebox Music Tab */
.osrs-music-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 8px;
}
.music-track-item {
    background: #241d14;
    border: 1px solid #4a3c28;
    border-radius: 4px;
    padding: 5px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.1s;
}
.music-track-item:hover {
    background: #362a1c;
}
.music-track-item.active {
    border-color: #22c55e;
    background: #1b3320;
}
.music-track-item .track-icon {
    font-size: 0.85rem;
}
.music-track-item .track-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}
.music-track-item .track-meta strong {
    color: #22c55e;
    font-size: 0.74rem;
}
.music-track-item .track-meta small {
    color: #aaa;
    font-size: 0.62rem;
}
.osrs-music-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    background: #18130d;
    border-radius: 4px;
    font-size: 0.68rem;
    color: #ffcc00;
}

/* Magic & Prayer Footer Details */
.osrs-spell-btn.active {
    border-color: #00d4ff;
    background: #143547;
}
.osrs-spell-info {
    font-size: 0.65rem;
    color: #00d4ff;
    padding: 4px;
    text-align: center;
    margin-top: 4px;
}
.osrs-prayer-footer {
    font-size: 0.64rem;
    color: #aaa;
    text-align: center;
    padding: 6px 4px 0 4px;
}

/* =========================================================================
   AUTHENTIC OSRS RIGHT-CLICK CONTEXT MENU
   ========================================================================= */
.osrs-context-menu {
    position: absolute;
    z-index: 9999;
    background: #2a2217;
    border: 2px solid #5a4732;
    border-radius: 2px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.95), inset 1px 1px 0 #7a6348, inset -1px -1px 0 #110d09;
    min-width: 150px;
    max-width: 280px;
    user-select: none;
    font-family: 'Consolas', 'Courier New', monospace;
    overflow: hidden;
}

.osrs-context-menu .context-menu-header {
    background: linear-gradient(180deg, #3d3121 0%, #292015 100%);
    color: #00ffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 8px;
    border-bottom: 1.5px solid #4a3a27;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 0 #000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.osrs-context-menu .context-menu-options {
    display: flex;
    flex-direction: column;
}

.osrs-context-menu .context-option {
    padding: 4px 8px;
    font-size: 0.70rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #ffff00;
    text-shadow: 1px 1px 0 #000;
    transition: background 0.08s, color 0.08s;
    white-space: nowrap;
}

.osrs-context-menu .context-option .opt-action {
    color: #ffffff;
    font-weight: 600;
}

.osrs-context-menu .context-option .opt-target {
    color: #ffff00;
    font-weight: 700;
}

.osrs-context-menu .context-option .opt-target.lvl-target {
    color: #ff9900;
}

.osrs-context-menu .context-option:hover {
    background: #002b54;
    color: #ffffff;
}

.osrs-context-menu .context-option:hover .opt-action,
.osrs-context-menu .context-option:hover .opt-target {
    color: #ffffff !important;
}

.osrs-context-menu .context-option.opt-cancel {
    color: #ffffff;
    border-top: 1px solid #3d301f;
}

.osrs-context-menu .context-option.opt-cancel:hover {
    background: #5a1e1e;
}

/* =========================================================================
   REFINED OSRS EQUIPMENT PAPERDOLL TAB
   ========================================================================= */
.osrs-paperdoll-grid {
    display: grid;
    grid-template-columns: repeat(3, 44px);
    grid-template-rows: repeat(5, 44px);
    gap: 6px;
    justify-content: center;
    margin: 6px 0 10px 0;
}

.doll-slot {
    width: 44px;
    height: 44px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
    user-select: none;
}

/* 3-Column OSRS Grid Positioning */
.slot-head   { grid-column: 2; grid-row: 1; }
.slot-cape   { grid-column: 1; grid-row: 2; }
.slot-neck   { grid-column: 2; grid-row: 2; }
.slot-ammo   { grid-column: 3; grid-row: 2; }
.slot-weapon { grid-column: 1; grid-row: 3; }
.slot-body   { grid-column: 2; grid-row: 3; }
.slot-shield { grid-column: 3; grid-row: 3; }
.slot-legs   { grid-column: 2; grid-row: 4; }
.slot-hands  { grid-column: 1; grid-row: 5; }
.slot-feet   { grid-column: 2; grid-row: 5; }
.slot-ring   { grid-column: 3; grid-row: 5; }

/* Empty Slot */
.doll-slot.empty {
    background: #19130c;
    border: 1.5px dashed #423422;
    opacity: 0.55;
    filter: grayscale(0.8);
}

.doll-slot.empty:hover {
    opacity: 0.85;
    border-color: #634d32;
}

.doll-slot.empty .slot-placeholder {
    font-size: 1.15rem;
    opacity: 0.5;
}

/* Equipped Slot */
.doll-slot.equipped {
    background: linear-gradient(135deg, #2b2216 0%, #3e301d 100%);
    border: 2px solid #eab308;
    box-shadow: 0 0 8px rgba(234, 179, 8, 0.4), inset 0 0 6px rgba(0, 0, 0, 0.5);
    opacity: 1;
    filter: none;
}

.doll-slot.equipped:hover {
    transform: scale(1.08);
    border-color: #facc15;
    box-shadow: 0 0 12px rgba(250, 204, 21, 0.65);
}

.doll-slot.equipped .slot-icon {
    font-size: 1.45rem;
}

.doll-slot .slot-count {
    position: absolute;
    bottom: 2px;
    right: 3px;
    font-size: 0.60rem;
    font-weight: 800;
    color: #ffff00;
    text-shadow: 1px 1px 0 #000, -1px -1px 0 #000;
    pointer-events: none;
}

.osrs-equipment-stats {
    font-size: 0.70rem;
    color: #ffcc00;
    background: #1b160f;
    border: 1px solid #483925;
    border-radius: 4px;
    padding: 6px 8px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px;
}

.osrs-equipment-stats div {
    font-weight: 700;
    text-shadow: 1px 1px 0 #000;
}

#statAtk { color: #f87171; }
#statStr { color: #fb923c; }
#statDef { color: #60a5fa; }
#statRng { color: #4ade80; }
#statMag { color: #38bdf8; }

/* ==========================================================================
   LIGHTING CONTROLS & AMBIENT COLOR PICKER MODAL
   ========================================================================== */
.light-control-card {
    max-width: 480px;
    width: 92vw;
    background: linear-gradient(145deg, #1f242d, #14181f);
    border: 2px solid #f1c40f;
    border-radius: 20px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8), 0 0 20px rgba(241, 196, 15, 0.2);
    padding: 22px;
    color: #fff;
    display: flex;
    flex-direction: column;
}

.light-control-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 10px;
}

.light-power-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 16px;
    border-radius: 12px;
}

.light-power-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #ecf0f1;
}

.light-toggle-btn {
    font-weight: 700;
    font-size: 0.9rem;
    padding: 8px 18px;
    border-radius: 24px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.light-toggle-btn.is-on {
    background: linear-gradient(135deg, #f1c40f, #e67e22);
    color: #111;
    box-shadow: 0 0 12px rgba(241, 196, 15, 0.5);
}

.light-toggle-btn.is-off {
    background: #34495e;
    color: #bdc3c7;
}

.light-section-heading {
    font-size: 0.82rem;
    font-weight: 700;
    color: #f1c40f;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
}

.light-dimmer-buttons {
    display: flex;
    gap: 8px;
}

.dimmer-btn {
    flex: 1;
    padding: 10px 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.dimmer-btn:hover {
    background: rgba(255, 255, 255, 0.14);
}

.dimmer-btn.active {
    background: rgba(241, 196, 15, 0.22);
    border-color: #f1c40f;
    color: #f1c40f;
    box-shadow: 0 0 10px rgba(241, 196, 15, 0.35);
}

.light-swatches-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.light-swatch-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #ecf0f1;
    cursor: pointer;
    font-size: 0.78rem;
    transition: all 0.2s ease;
    text-align: left;
}

.light-swatch-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}

.light-swatch-btn.active {
    border-color: #f1c40f;
    background: rgba(241, 196, 15, 0.25);
    box-shadow: 0 0 10px rgba(241, 196, 15, 0.3);
}

.swatch-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
    display: inline-block;
}

.custom-color-picker-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    font-size: 0.85rem;
}

.custom-color-picker-row input[type="color"] {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
    padding: 0;
}

.color-hex-tag {
    font-family: monospace;
    font-size: 0.85rem;
    color: #f1c40f;
    font-weight: 700;
}

.light-modal-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

.close-light-btn {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border-color: #2ecc71;
    color: #fff;
    padding: 8px 24px;
    font-weight: 700;
    border-radius: 20px;
    cursor: pointer;
}

/* ==========================================================================
   DAILY LOGIN REWARDS & LIVE-OPS SEASON PASS STYLES
   ========================================================================== */
.daily-pass-chip-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(6, 78, 59, 0.4));
    border: 1px solid rgba(16, 185, 129, 0.45);
    color: #f8fafc;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    font-weight: 700;
}
.daily-pass-chip-btn:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.4), rgba(6, 78, 59, 0.6));
    border-color: #10b981;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}
.daily-pass-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f59e0b;
    border: 2px solid #0f172a;
}
.daily-pass-badge.pulse {
    animation: beaconPulse 1.5s infinite;
}
@keyframes beaconPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
    70% { transform: scale(1.2); box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.daily-rewards-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 15, 28, 0.85);
    backdrop-filter: blur(8px);
}
.daily-rewards-modal-overlay.hidden { display: none !important; }
.daily-rewards-card {
    width: 92%;
    max-width: 820px;
    max-height: 88vh;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #f8fafc;
}
.daily-rewards-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(15, 23, 42, 0.8));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.header-branding {
    display: flex;
    align-items: center;
    gap: 12px;
}
.modal-icon-flare {
    font-size: 2rem;
    filter: drop-shadow(0 2px 8px rgba(16, 185, 129, 0.4));
}
.daily-tabs-nav {
    display: flex;
    background: rgba(0, 0, 0, 0.25);
    padding: 8px 16px;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.daily-tab-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
.daily-tab-btn.active {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.35);
}
.tab-chip-alert {
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 10px;
}

.daily-tab-body {
    padding: 18px 20px;
    overflow-y: auto;
    flex: 1;
}

/* 7-Day Streak Grid */
.streak-overview-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 18px;
}
.streak-counter {
    display: flex;
    align-items: center;
    gap: 12px;
}
.flame-icon {
    font-size: 2.2rem;
    filter: drop-shadow(0 2px 8px rgba(245, 158, 11, 0.5));
}
.streak-num {
    font-size: 1.25rem;
    font-weight: 800;
    color: #f59e0b;
}
.streak-meta {
    font-size: 0.78rem;
    color: #94a3b8;
}
.claim-mega-btn {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    font-size: 0.95rem !important;
    padding: 10px 22px !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4) !important;
    cursor: pointer;
}
.streak-claimed-badge {
    font-size: 0.84rem;
    color: #10b981;
    font-weight: 700;
    background: rgba(16, 185, 129, 0.1);
    padding: 8px 14px;
    border-radius: 20px;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.streak-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}
.streak-day-card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.2s;
    position: relative;
}
.streak-day-card.current-day {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.12);
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.2);
}
.streak-day-card.jackpot-card {
    border-color: #f59e0b;
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.15), rgba(30, 41, 59, 0.8));
}
.streak-day-card.is-claimed {
    opacity: 0.65;
}
.day-num-header {
    font-size: 0.72rem;
    font-weight: 800;
    color: #94a3b8;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}
.day-icon {
    font-size: 1.8rem;
    margin: 4px 0;
}
.day-reward-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 4px;
}
.day-reward-value {
    font-size: 0.72rem;
    color: #38bdf8;
    line-height: 1.2;
    margin-bottom: 6px;
    min-height: 28px;
}
.day-xp-badge {
    font-size: 0.68rem;
    color: #10b981;
    font-weight: 700;
    background: rgba(16, 185, 129, 0.12);
    padding: 2px 6px;
    border-radius: 8px;
    margin-bottom: 8px;
}
.day-stamp {
    font-size: 0.66rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 12px;
    letter-spacing: 0.5px;
}
.day-stamp.claimed { background: rgba(148, 163, 184, 0.2); color: #94a3b8; }
.day-stamp.claimable { background: #10b981; color: #fff; }
.day-stamp.completed { background: rgba(16, 185, 129, 0.25); color: #10b981; }
.day-stamp.locked { background: rgba(0, 0, 0, 0.3); color: #64748b; }

/* Season Tab */
.season-progress-card {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}
.season-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.season-total-xp strong { color: #10b981; font-size: 1.15rem; }
.season-main-bar-bg {
    width: 100%;
    height: 10px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 16px;
}
.season-main-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #06b6d4);
    border-radius: 5px;
    transition: width 0.4s ease;
}
.season-tiers-track {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}
.tier-node {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 10px 6px;
    text-align: center;
    font-size: 0.74rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.tier-node.unlocked { border-color: #10b981; background: rgba(16, 185, 129, 0.1); }
.tier-node.claimed { opacity: 0.6; }
.tier-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    margin: 6px 0;
}
.tier-node.unlocked .tier-circle { background: #10b981; color: #fff; }
.tier-name { font-weight: 700; color: #f8fafc; margin-bottom: 2px; }
.tier-reward { color: #38bdf8; font-size: 0.68rem; margin-bottom: 6px; }

/* Quests */
.quests-list-grid { display: flex; flex-direction: column; gap: 8px; }
.quest-row-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(30, 41, 59, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 10px 14px;
}
.quest-row-card.quest-ready { border-color: #10b981; background: rgba(16, 185, 129, 0.08); }
.quest-row-card.quest-claimed { opacity: 0.55; }
.quest-icon { font-size: 1.8rem; }
.quest-info { flex: 1; min-width: 0; }
.quest-title-row { display: flex; justify-content: space-between; font-size: 0.86rem; margin-bottom: 2px; }
.quest-desc { font-size: 0.74rem; color: #94a3b8; margin-bottom: 6px; }
.quest-bar-bg { width: 100%; height: 6px; background: rgba(0, 0, 0, 0.3); border-radius: 3px; overflow: hidden; }
.quest-bar-fill { height: 100%; background: #10b981; border-radius: 3px; }
.quest-reward-col { display: flex; flex-direction: column; gap: 4px; }
.reward-pill { font-size: 0.7rem; font-weight: 700; color: #10b981; background: rgba(16, 185, 129, 0.12); padding: 2px 8px; border-radius: 10px; text-align: center; }
.reward-pill.money { color: #f59e0b; background: rgba(245, 158, 11, 0.12); }
.reward-pill.diamond { color: #06b6d4; background: rgba(6, 182, 212, 0.12); }
.quest-action-col button { padding: 6px 16px; font-size: 0.8rem; cursor: pointer; }
.quest-done-lbl { font-size: 0.75rem; color: #94a3b8; font-weight: 700; }
.quest-locked-lbl { font-size: 0.75rem; color: #64748b; }

/* ==========================================================================
   CREATE-A-MEL 2.0: WARDROBE STYLIST & CAS SALON STYLES
   ========================================================================== */
.wardrobe-salon-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 15, 28, 0.85);
    backdrop-filter: blur(8px);
}
.wardrobe-salon-modal-overlay.hidden { display: none !important; }
.wardrobe-salon-card {
    width: 92%;
    max-width: 820px;
    max-height: 88vh;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #f8fafc;
}
.salon-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.18), rgba(15, 23, 42, 0.85));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.salon-branding { display: flex; align-items: center; gap: 12px; }
.salon-icon-badge { font-size: 2rem; filter: drop-shadow(0 2px 8px rgba(236, 72, 153, 0.4)); }

.salon-name-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.salon-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}
.salon-input-group input, .salon-input-group select {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.88rem;
}
.salon-tabs-nav {
    display: flex;
    background: rgba(0, 0, 0, 0.15);
    padding: 8px 16px;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.salon-tab-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.88rem;
}
.salon-tab-btn.active {
    background: rgba(236, 72, 153, 0.2);
    color: #f472b6;
    border: 1px solid rgba(236, 72, 153, 0.35);
}
.salon-tab-body {
    padding: 18px 20px;
    overflow-y: auto;
    flex: 1;
}
.salon-sub-section { margin-bottom: 18px; }
.salon-sub-section h4 {
    margin: 0 0 10px 0;
    color: #f8fafc;
    font-size: 0.95rem;
}
.hairstyles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}
.hairstyle-card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.hairstyle-card:hover {
    border-color: #f472b6;
    background: rgba(236, 72, 153, 0.1);
}
.hairstyle-card.active {
    border-color: #f472b6;
    background: rgba(236, 72, 153, 0.18);
    box-shadow: 0 0 12px rgba(236, 72, 153, 0.3);
}
.hair-icon { font-size: 1.6rem; margin-bottom: 4px; }
.hair-name { font-size: 0.82rem; margin-bottom: 2px; }
.hair-desc { font-size: 0.7rem; color: #94a3b8; }

.swatches-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.color-swatch-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.15s, box-shadow 0.15s;
}
.color-swatch-circle:hover {
    transform: scale(1.18);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}
.color-swatch-circle.active {
    border-color: #ffffff;
    box-shadow: 0 0 12px #f472b6, 0 0 0 2px #fff;
    transform: scale(1.12);
}
.color-swatch-circle.mini {
    width: 26px;
    height: 26px;
}

.skin-tones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}
.skin-tone-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.skin-tone-card:hover { border-color: #f472b6; background: rgba(236, 72, 153, 0.1); }
.skin-tone-card.active { border-color: #f472b6; background: rgba(236, 72, 153, 0.2); }
.skin-color-orb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.skin-tone-name { font-size: 0.78rem; font-weight: 700; }

.outfit-slots-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.outfit-slot-btn {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    padding: 6px 14px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.2s;
}
.outfit-slot-btn.active {
    background: rgba(236, 72, 153, 0.25);
    border-color: #f472b6;
    color: #f472b6;
}
.wardrobe-pieces-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}
.piece-color-col h5 {
    margin: 0 0 8px 0;
    font-size: 0.84rem;
    color: #94a3b8;
}

.salon-footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.save-salon-btn {
    background: linear-gradient(135deg, #ec4899, #db2777) !important;
    border-color: #ec4899 !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(236, 72, 153, 0.4) !important;
    cursor: pointer;
}

/* ==========================================================================
   PET COMPANIONS & CREATURE SANCTUARY ENGINE
   ========================================================================== */
.pet-sanctuary-modal .modal-card {
    max-width: 780px;
    width: 95%;
    background: radial-gradient(circle at 15% 15%, #1e1b4b 0%, #0f172a 100%);
    border: 1px solid rgba(245, 158, 11, 0.4);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 24px rgba(245, 158, 11, 0.2);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pet-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}
.pet-badge-pill {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid #f59e0b;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 700;
}

.pet-nav-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.pet-tab {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    color: #94a3b8;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}
.pet-tab.active {
    color: #f59e0b;
    border-bottom-color: #f59e0b;
    background: rgba(245, 158, 11, 0.08);
}

.pet-modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.pet-care-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
}
@media (max-width: 680px) {
    .pet-care-grid { grid-template-columns: 1fr; }
}

.pet-preview-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.pet-avatar-hero {
    font-size: 4rem;
    margin-bottom: 8px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}
.pet-preview-box h3 { margin: 0; font-size: 1.25rem; color: #fff; }
.pet-breed-label { font-size: 0.8rem; color: #94a3b8; margin: 4px 0 14px 0; }

.collar-swatch-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin: 6px 0 14px 0;
}
.collar-swatch {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.15s;
}
.collar-swatch:hover { transform: scale(1.2); }
.collar-swatch.active { border-color: #ffffff; transform: scale(1.15); box-shadow: 0 0 8px rgba(255, 255, 255, 0.5); }

.pet-rename-row {
    display: flex;
    gap: 8px;
    width: 100%;
}
.pet-rename-row input {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.pet-motives-panel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px;
}
.pet-motives-panel h4 { margin: 0 0 14px 0; color: #f59e0b; font-size: 1rem; }
.pet-motive-bar-wrap { margin-bottom: 12px; }
.motive-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    margin-bottom: 4px;
    color: #e2e8f0;
}
.motive-track {
    height: 8px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    overflow: hidden;
}
.motive-fill { height: 100%; border-radius: 4px; transition: width 0.3s ease; }
.fill-hunger { background: linear-gradient(90deg, #ef4444, #f59e0b); }
.fill-energy { background: linear-gradient(90deg, #3b82f6, #06b6d4); }
.fill-affection { background: linear-gradient(90deg, #ec4899, #f43f5e); }

.pet-actions-quick-row {
    display: flex;
    gap: 8px;
    margin: 16px 0;
    flex-wrap: wrap;
}
.pet-actions-quick-row button {
    flex: 1;
    min-width: 120px;
    padding: 8px 12px;
    font-size: 0.82rem;
    cursor: pointer;
}

.pet-stats-box {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    background: rgba(0, 0, 0, 0.25);
    padding: 10px;
    border-radius: 8px;
    font-size: 0.78rem;
    color: #94a3b8;
}
.pet-stats-box strong { color: #f59e0b; }

.pet-tricks-container { display: flex; flex-direction: column; gap: 14px; }
.trick-level-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 12px 18px;
    border-radius: 12px;
}
.trick-xp-badge {
    background: #f59e0b;
    color: #0f172a;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
}
.tricks-list { display: flex; flex-direction: column; gap: 10px; }
.trick-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.trick-card.unlocked { border-color: rgba(245, 158, 11, 0.35); }
.trick-icon { font-size: 1.8rem; }
.trick-info { flex: 1; }
.trick-info h4 { margin: 0 0 4px 0; color: #fff; font-size: 0.95rem; }
.trick-info p { margin: 0; font-size: 0.8rem; color: #94a3b8; }
.trick-req-pill {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    margin-left: 6px;
}

.pet-adopt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.adopt-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.adopt-card.current-pet {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}
.adopt-icon { font-size: 3rem; margin-bottom: 6px; }
.adopt-card h3 { margin: 0 0 4px 0; color: #fff; font-size: 1.1rem; }
.adopt-breed { color: #f59e0b; font-size: 0.8rem; font-weight: 700; margin-bottom: 8px; }
.adopt-desc { font-size: 0.78rem; color: #94a3b8; margin-bottom: 8px; flex: 1; }
.adopt-food { font-size: 0.76rem; color: #cbd5e1; margin-bottom: 12px; }
.active-pet-tag { color: #10b981; font-weight: 800; font-size: 0.84rem; }

/* ==========================================================================
   OPEN FOR BUSINESS: RETAIL SHOPS & COMMERCE SIMULATOR
   ========================================================================== */
.business-shop-modal .modal-card {
    max-width: 840px;
    width: 95%;
    background: radial-gradient(circle at 15% 15%, #064e3b 0%, #0f172a 100%);
    border: 1px solid rgba(16, 185, 129, 0.4);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 24px rgba(16, 185, 129, 0.2);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.business-header-info { display: flex; align-items: center; gap: 12px; }
.business-type-badge {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid #10b981;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 700;
}
.business-header-controls { display: flex; align-items: center; gap: 10px; }
.btn-store-open {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border-color: #34d399 !important;
    color: #fff !important;
    font-weight: 700;
    cursor: pointer;
}
.btn-store-closed {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    border-color: #f87171 !important;
    color: #fff !important;
    font-weight: 700;
    cursor: pointer;
}

.business-tabs-nav {
    display: flex;
    background: rgba(0, 0, 0, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.business-tab {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    color: #94a3b8;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}
.business-tab.active {
    color: #10b981;
    border-bottom-color: #10b981;
    background: rgba(16, 185, 129, 0.08);
}

.business-tab-content {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.biz-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}
@media (max-width: 600px) {
    .biz-kpi-grid { grid-template-columns: 1fr; }
}
.kpi-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.kpi-icon { font-size: 2rem; }
.kpi-info { display: flex; flex-direction: column; }
.kpi-label { font-size: 0.75rem; color: #94a3b8; text-transform: uppercase; }
.kpi-value { font-size: 1.25rem; color: #fff; }

.biz-dashboard-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 680px) {
    .biz-dashboard-sections { grid-template-columns: 1fr; }
}
.biz-recent-sales, .biz-quick-actions {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 16px;
}
.biz-recent-sales h3, .biz-quick-actions h3 {
    margin: 0 0 12px 0;
    color: #10b981;
    font-size: 0.95rem;
}
.sales-list { display: flex; flex-direction: column; gap: 8px; }
.sale-entry {
    display: grid;
    grid-template-columns: 1.5fr 1fr 0.8fr 0.8fr;
    align-items: center;
    background: rgba(0, 0, 0, 0.25);
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #cbd5e1;
}
.sale-price { color: #10b981; font-weight: 700; text-align: right; }
.sale-time { color: #64748b; font-size: 0.72rem; text-align: right; }

.store-rename-form { margin-bottom: 16px; }
.store-rename-form label, .store-markup-selector label {
    display: block;
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 6px;
}
.form-row { display: flex; gap: 8px; }
.form-row input {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
}
.markup-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.markup-pill {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s;
}
.markup-pill.active {
    background: rgba(16, 185, 129, 0.25);
    border-color: #10b981;
    color: #10b981;
    font-weight: 700;
}

.stock-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.stock-header-row h3 { margin: 0 0 4px 0; color: #fff; }
.stock-header-row p { margin: 0; font-size: 0.8rem; color: #94a3b8; }
.shelf-stock-table-wrap { overflow-x: auto; }
.shelf-stock-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}
.shelf-stock-table th {
    text-align: left;
    padding: 10px;
    color: #94a3b8;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.shelf-stock-table td {
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #f1f5f9;
}
.stock-cat-pill {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
    text-transform: capitalize;
}
.stock-count-badge {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.74rem;
    font-weight: 700;
}
.stock-count-badge.out-of-stock {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.reviews-feed { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.review-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 16px;
}
.review-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.review-author { color: #f59e0b; font-size: 0.88rem; }
.review-stars { font-size: 0.85rem; }
.review-date { font-size: 0.72rem; color: #64748b; }
.review-quote { margin: 0; font-size: 0.82rem; color: #cbd5e1; font-style: italic; }

.perks-list { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.perk-card {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 14px 18px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.perk-card.perk-unlocked {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.06);
}
.perk-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.perk-title-row h4 { margin: 0; color: #fff; font-size: 0.95rem; }
.perk-status { font-size: 0.75rem; font-weight: 700; color: #10b981; }
.perk-card.perk-locked .perk-status { color: #f59e0b; }
.perk-body p { margin: 0; font-size: 0.8rem; color: #94a3b8; }
.perk-progress-wrap {
    height: 6px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 3px;
    margin-top: 8px;
    overflow: hidden;
}
.perk-progress-bar { height: 100%; background: #f59e0b; border-radius: 3px; }
.perk-progress-text { font-size: 0.7rem; color: #64748b; margin-top: 2px; display: block; }

/* ==========================================================================
   FISHING, MARINE ECOLOGY & VALLEY AQUARIUM SYSTEM (v73)
   ========================================================================== */
.marine-ecology-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(6, 15, 29, 0.78);
    backdrop-filter: blur(10px);
    z-index: 9500;
    align-items: center;
    justify-content: center;
}
.marine-ecology-modal.active,
.marine-ecology-modal:not(.hidden):not([style*="display: none"]) {
    display: flex;
}
.marine-modal-card {
    width: 900px;
    max-width: 95vw;
    max-height: 88vh;
    background: linear-gradient(145deg, rgba(14, 28, 48, 0.96), rgba(8, 18, 33, 0.98));
    border: 1px solid rgba(56, 189, 248, 0.35);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(56, 189, 248, 0.15);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #e2e8f0;
}
.marine-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.marine-header-info h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #38bdf8;
    font-weight: 800;
}
.marine-rank-badge {
    background: rgba(56, 189, 248, 0.18);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}
.marine-tabs-nav {
    display: flex;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.marine-tab {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}
.marine-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}
.marine-tab.active {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.3);
}
.marine-tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}
.marine-journal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.fish-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.2s, border-color 0.2s;
}
.fish-card:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.4);
}
.fish-card.locked {
    opacity: 0.55;
    filter: grayscale(0.5);
}
.fish-card.tier-legendary {
    border-color: rgba(245, 158, 11, 0.4);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.06), rgba(255, 255, 255, 0.02));
}
.fish-icon-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.fish-icon {
    font-size: 2rem;
}
.tier-pill {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 8px;
    letter-spacing: 0.5px;
}
.tier-common .tier-pill { background: rgba(148, 163, 184, 0.2); color: #94a3b8; }
.tier-uncommon .tier-pill { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.tier-rare .tier-pill { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
.tier-epic .tier-pill { background: rgba(168, 85, 247, 0.2); color: #c084fc; }
.tier-legendary .tier-pill { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.fish-name {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}
.fish-habitat {
    margin: 0;
    font-size: 0.75rem;
    color: #94a3b8;
}
.fish-meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: #cbd5e1;
    font-weight: 600;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 6px 0;
}
.fish-desc {
    margin: 0;
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.35;
}
.stock-fish-btn {
    margin-top: 4px;
    font-size: 0.78rem;
    padding: 6px 12px;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    border-color: #38bdf8;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
}
.tank-showcase-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 16px;
    padding: 20px;
}
.tank-showcase-card h3 {
    margin-top: 0;
    color: #38bdf8;
}
.stocked-fish-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.stocked-fish-chip {
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #e0f2fe;
}
.ranks-ladder {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
}
.rank-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}
.rank-card.achieved {
    border-color: rgba(34, 197, 94, 0.4);
    background: rgba(34, 197, 94, 0.06);
}
.rank-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.rank-header strong {
    color: #fff;
    font-size: 0.9rem;
}
.rank-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
}
.rank-card.achieved .rank-badge {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}
.rank-perk {
    margin: 0;
    font-size: 0.8rem;
    color: #94a3b8;
}

/* Tension Reel Minigame Overlay */
.fishing-reel-overlay {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 25, 47, 0.92);
    border: 2px solid #38bdf8;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8), 0 0 20px rgba(56, 189, 248, 0.3);
    border-radius: 16px;
    padding: 16px 24px;
    z-index: 9600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #fff;
}
.reel-instructions {
    font-size: 0.85rem;
    font-weight: 700;
    color: #38bdf8;
}
.tension-bar-track {
    width: 260px;
    height: 18px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 9px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.tension-sweet-spot {
    position: absolute;
    left: 35%;
    width: 30%;
    height: 100%;
    background: rgba(34, 197, 94, 0.35);
    border-left: 2px solid #22c55e;
    border-right: 2px solid #22c55e;
}
.tension-needle {
    position: absolute;
    top: 0;
    width: 8px;
    height: 100%;
    background: #f59e0b;
    border-radius: 4px;
    transform: translateX(-50%);
    transition: left 0.05s ease-out;
}
.reel-btn {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    border: 1px solid #38bdf8;
    color: #fff;
    padding: 8px 24px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.1s;
}
.reel-btn:active {
    transform: scale(0.95);
}

/* ==========================================================================
   RELATIONSHIPS 2.0: ROMANCE & HOUSEHOLD ROOMMATES SYSTEM (v73)
   ========================================================================== */
.relationship-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(18, 9, 23, 0.78);
    backdrop-filter: blur(10px);
    z-index: 9500;
    align-items: center;
    justify-content: center;
}
.relationship-modal.active,
.relationship-modal:not(.hidden):not([style*="display: none"]) {
    display: flex;
}
.rel-modal-card {
    width: 900px;
    max-width: 95vw;
    max-height: 88vh;
    background: linear-gradient(145deg, rgba(32, 14, 38, 0.96), rgba(20, 8, 25, 0.98));
    border: 1px solid rgba(244, 114, 182, 0.35);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(244, 114, 182, 0.15);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #fce7f3;
}
.rel-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.rel-header-info h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #f472b6;
    font-weight: 800;
}
.rel-family-badge {
    background: rgba(244, 114, 182, 0.18);
    border: 1px solid rgba(244, 114, 182, 0.4);
    color: #f472b6;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}
.relationship-tabs-nav {
    display: flex;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.rel-tab {
    background: transparent;
    border: none;
    color: #cbd5e1;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}
.rel-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}
.rel-tab.active {
    color: #f472b6;
    background: rgba(244, 114, 182, 0.15);
    border: 1px solid rgba(244, 114, 182, 0.3);
}
.relationship-tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}
.rel-contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 16px;
}
.rel-contact-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.2s, border-color 0.2s;
}
.rel-contact-card:hover {
    transform: translateY(-2px);
    border-color: rgba(244, 114, 182, 0.4);
}
.contact-header {
    display: flex;
    align-items: center;
    gap: 10px;
}
.contact-icon {
    font-size: 2rem;
}
.contact-info {
    flex: 1;
}
.contact-info h4 {
    margin: 0;
    font-size: 0.95rem;
    color: #fff;
}
.contact-sub {
    font-size: 0.75rem;
    color: #f472b6;
}
.rel-tier-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 8px;
    white-space: nowrap;
}
.rel-meter-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.meter-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #e2e8f0;
}
.rel-track {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    overflow: hidden;
}
.rel-fill {
    height: 100%;
    background: linear-gradient(90deg, #ec4899, #f43f5e);
    border-radius: 4px;
    transition: width 0.3s ease;
}
.contact-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}
.social-act-btn {
    font-size: 0.75rem;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}
.social-act-btn:hover {
    background: rgba(244, 114, 182, 0.2);
    border-color: #f472b6;
    color: #fbcfe8;
}
.milestone-act-btn {
    font-size: 0.75rem;
    padding: 5px 10px;
    background: linear-gradient(135deg, #ec4899, #be185d);
    border: 1px solid #f472b6;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.15s;
}
.milestone-act-btn:hover {
    box-shadow: 0 0 10px rgba(244, 114, 182, 0.5);
}
.roommate-header-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(244, 114, 182, 0.2);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}
.roommate-header-card h3 {
    margin-top: 0;
    color: #f472b6;
}
.rent-collected-badge {
    margin: 12px 0;
    font-size: 0.95rem;
    color: #34d399;
}
.collect-rent-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    border: 1px solid #34d399;
    color: #fff;
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}
.roommate-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.roommate-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: center;
}
.roommate-avatar {
    font-size: 2.2rem;
}
.roommate-details h4 {
    margin: 0;
    color: #fff;
    font-size: 0.95rem;
}
.roommate-badge {
    display: inline-block;
    font-size: 0.7rem;
    color: #34d399;
    background: rgba(16, 185, 129, 0.15);
    padding: 2px 6px;
    border-radius: 6px;
    margin-top: 2px;
}
.roommate-details p {
    margin: 6px 0 0 0;
    font-size: 0.78rem;
    color: #cbd5e1;
}
.chore-toggle-btn {
    font-size: 0.72rem;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
}
.matrimony-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(244, 114, 182, 0.25);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}
.matrimony-rings {
    font-size: 2.5rem;
    margin-bottom: 8px;
}
.matrimony-card h3 {
    margin: 0 0 8px 0;
    color: #f472b6;
    font-size: 1.3rem;
}
.spousal-perks-box,
.how-to-marry-box {
    margin-top: 20px;
    text-align: left;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    padding: 16px 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.spousal-perks-box h4,
.how-to-marry-box h4 {
    margin: 0 0 8px 0;
    color: #fbcfe8;
}
.spousal-perks-box ul,
.how-to-marry-box ol {
    margin: 0;
    padding-left: 20px;
    font-size: 0.85rem;
    color: #cbd5e1;
    line-height: 1.5;
}




